更新时间:2021-07-23 15:33:52
封面
版权信息
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Chapter 1. Setting Up and Installing Laravel
Introduction
Installing Laravel as a git submodule
Setting up a virtual host and development environment in Apache
Creating "clean" URLs
Configuring Laravel
Using Laravel with Sublime Text 2
Setting up your IDE to autocomplete Laravel's namespaces
Using Autoloader to map a class name to its file
Creating advanced Autoloaders with namespaces and directories
Chapter 2. Using Forms and Gathering Input
Creating a simple form
Gathering form input to display on another page
Validating user input
Creating a file uploader
Validating a file upload
Creating a custom error message
Adding a honey pot to a form
Uploading an image using Redactor
Cropping an image with Jcrop
Creating an autocomplete text input
Making a CAPTCHA-style spam catcher
Chapter 3. Authenticating Your Application
Setting up and configuring the Auth library
Creating an authentication system
Retrieving and updating user info after logging in
Restricting access to certain pages
Setting up OAuth with the HybridAuth package
Using OpenID for logins
Logging in using Facebook credentials
Logging in using Twitter credentials
Logging in using LinkedIn
Chapter 4. Storing and Using Data
Creating data tables using migrations and schemas
Querying using raw SQL statements
Querying using Fluent
Querying using Eloquent ORM
Using automatic validation in models
Using advanced Eloquent and relationships
Creating a CRUD system
Importing a CSV using Eloquent
Using RSS as a data source
Using attributes to change table column names
Using a non-Eloquent ORM in Laravel
Chapter 5. Using Controllers and Routes for URLs and APIs
Creating a basic controller
Creating a route using a closure
Creating a RESTful controller
Using advanced routing
Using a filter on the route
Using route groups
Building a RESTful API with routes
Using named routes
Using a subdomain in your route
Chapter 6. Displaying Your Views
Creating and using a basic view
Passing data into a view
Loading a view into another view/nested views
Adding assets
Creating a view using Blade
Using TWIG templates
Utilizing advanced Blade usage
Creating localization of content
Creating menus in Laravel
Integrating with Bootstrap
Using named views and view composers
Chapter 7. Creating and Using Composer Packages
Downloading and installing packages
Using the Generators package to set up an app
Creating a Composer package in Laravel
Adding your Composer package to Packagist
Adding a non-Packagist package to Composer
Creating a custom artisan command
Chapter 8. Using Ajax and jQuery
Getting data from another page
Setting up a controller to return JSON data
Creating an Ajax search function
Creating and validating a user using Ajax
Filtering data based on checkbox selection
Making an Ajax newsletter sign-up box
Sending an e-mail using Laravel and jQuery
Creating a sortable table using jQuery and Laravel
Chapter 9. Using Security and Sessions Effectively
Encrypting and decrypting data
Hashing passwords and other data