Leanpub Header

Skip to main content

Laravel 5.3 Docs

This book is an up-to-date compilation of the official documentation pages, for 5.3.x version of Laravel, hosted on https://laravel.com/docs/5.3/ to help the community to have an easy to read & organized offline documentation that can be used as a portable reference.

Free With Membership

With Membership

Free!

$7.99

You pay

$7.99

Author earns

$6.39
$

...Or Buy With Credits!

You can get credits monthly with a Reader Membership
PDF
EPUB
WEB
757
Pages
About

About

About the Book

This book is an up-to-date compilation of the official documentation pages hosted on http://laravel.com/docs to help the community to have an easy to read & organised offline documentation that can be used as a portable reference.

I will try my best to keep this book in sync with the official documentation by reviewing the changes in documentation repo periodically. If you find any error in the documentation or want to contribute, please feel free to fork the documentation repo in github and send pull request with corrections/enhancements. When your pull request will be accepted & merged into the repo, those updates will automatically be available in this book through next periodic sync.

Share this book

Categories

License

Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

Author

About the Author

M N Islam Shihan

Founder & CTO at Sphinx Corporation

An accomplished Software Engineer & Leader specializing in Object-Oriented Design and Analysis with extensive experience in the full life cycle of the software design process including requirement analysis, prototyping, proof of concept, design of application, platform and user interface architecture design, implementation, testing and maintenance. Additional expertise includes project management and strong communication skills on both technical and business domains.

Social Profiles

Contents

Table of Contents

Prologue

Release Notes

  1. Support Policy
  2. Laravel 5.3
  3. Laravel 5.2
  4. Laravel 5.1.11
  5. Laravel 5.1.4
  6. Laravel 5.1
  7. Laravel 5.0
  8. Laravel 4.2
  9. Laravel 4.1

Upgrade Guide

  1. Upgrading To 5.3.0 From 5.2
  2. Upgrading To 5.2.0 From 5.1
  3. Upgrading To 5.1.11
  4. Upgrading To 5.1.0
  5. Upgrading To 5.0.16
  6. Upgrading To 5.0 From 4.2
  7. Upgrading To 4.2 From 4.1
  8. Upgrading To 4.1.29 From <= 4.1.x
  9. Upgrading To 4.1.26 From <= 4.1.25
  10. Upgrading To 4.1 From 4.0

Contribution Guide

  1. Bug Reports
  2. Core Development Discussion
  3. Which Branch?
  4. Security Vulnerabilities
  5. Coding Style
  6. Getting Started

Installation

  1. Installation
  2. Web Server Configuration

Configuration

  1. Introduction
  2. Accessing Configuration Values
  3. Environment Configuration
  4. Configuration Caching
  5. Maintenance Mode

Directory Structure

  1. Introduction
  2. The Root Directory
  3. The App Directory

Errors & Logging

  1. Introduction
  2. Configuration
  3. The Exception Handler
  4. HTTP Exceptions
  5. Logging
  6. Dev Environments

Laravel Homestead

  1. Introduction
  2. Installation & Setup
  3. Daily Usage
  4. Network Interfaces
  5. Updating Homestead
  6. Old Versions

Laravel Valet

  1. Introduction
  2. Installation
  3. Serving Sites
  4. Sharing Sites
  5. Viewing Logs
  6. Custom Valet Drivers
  7. Other Valet Commands
  8. Core Concepts

Service Container

  1. Introduction
  2. Binding
  3. Resolving
  4. Container Events

Service Providers

  1. Introduction
  2. Writing Service Providers
  3. Registering Providers
  4. Deferred Providers

Facades

  1. Introduction
  2. When To Use Facades
  3. How Facades Work
  4. Facade Class Reference

Contracts

  1. Introduction
  2. When To Use Contracts
  3. How To Use Contracts
  4. Contract Reference
  5. The HTTP Layer

Routing

  1. Basic Routing
  2. Route Parameters
  3. Named Routes
  4. Route Groups
  5. Route Model Binding
  6. Form Method Spoofing
  7. Accessing The Current Route

Middleware

  1. Introduction
  2. Defining Middleware
  3. Registering Middleware
  4. Middleware Parameters
  5. Terminable Middleware

CSRF Protection

  1. Introduction
  2. Excluding URIs From CSRF Protection
  3. X-CSRF-TOKEN
  4. X-XSRF-TOKEN

Controllers

  1. Introduction
  2. Basic Controllers
  3. Controller Middleware
  4. Resource Controllers
  5. Dependency Injection & Controllers
  6. Route Caching

HTTP Requests

  1. Accessing The Request
  2. Retrieving Input

HTTP Responses

  1. Creating Responses
  2. Redirects
  3. Other Response Types
  4. Response Macros

HTTP Session

  1. Introduction
  2. Using The Session
  3. Adding Custom Session Drivers

Validation

  1. Introduction
  2. Validation Quickstart
  3. Form Request Validation
  4. Manually Creating Validators
  5. Working With Error Messages
  6. Available Validation Rules
  7. Conditionally Adding Rules
  8. Validating Arrays
  9. Custom Validation Rules
  10. Views & Templates

Views

  1. Creating Views
  2. Passing Data To Views
  3. View Composers

Blade Templates

  1. Introduction
  2. Template Inheritance
  3. Displaying Data
  4. Control Structures
  5. Including Sub-Views
  6. Stacks
  7. Service Injection
  8. Extending Blade

Localization

  1. Introduction
  2. Retrieving Language Lines
  3. Overriding Package Language Files
  4. JavaScript & CSS

JavaScript & CSS

  1. Introduction
  2. Writing CSS
  3. Writing JavaScript

Compiling Assets (Laravel Elixir)

  1. Introduction
  2. Installation & Setup
  3. Running Elixir
  4. Working With Stylesheets
  5. Working With Scripts
  6. Copying Files & Directories
  7. Versioning / Cache Busting
  8. BrowserSync
  9. Security

Authentication

  1. Introduction
  2. Authentication Quickstart
  3. Manually Authenticating Users
  4. HTTP Basic Authentication
  5. Adding Custom Guards
  6. Adding Custom User Providers
  7. Events

Authorization

  1. Introduction
  2. Gates
  3. Creating Policies
  4. Writing Policies
  5. Authorizing Actions Using Policies

Resetting Passwords

  1. Introduction
  2. Database Considerations
  3. Routing
  4. Views
  5. After Resetting Passwords
  6. Customization

API Authentication (Passport)

  1. Introduction
  2. Installation
  3. Configuration
  4. Issuing Access Tokens
  5. Password Grant Tokens
  6. Implicit Grant Tokens
  7. Client Credentials Grant Tokens
  8. Personal Access Tokens
  9. Protecting Routes
  10. Token Scopes
  11. Consuming Your API With JavaScript
  12. Events

Encryption

  1. Introduction
  2. Configuration
  3. Using The Encrypter

Hashing

  1. Introduction
  2. Basic Usage
  3. General Topics

Event Broadcasting

  1. Introduction
  2. Concept Overview
  3. Defining Broadcast Events
  4. Authorizing Channels
  5. Broadcasting Events
  6. Receiving Broadcasts
  7. Presence Channels
  8. Notifications

Cache

  1. Configuration
  2. Cache Usage
  3. Cache Tags
  4. Adding Custom Cache Drivers
  5. Events

Events

  1. Introduction
  2. Registering Events & Listeners
  3. Defining Events
  4. Defining Listeners
  5. Queued Event Listeners
  6. Firing Events
  7. Event Subscribers

Filesystem / Cloud Storage

  1. Introduction
  2. Configuration
  3. Obtaining Disk Instances
  4. Retrieving Files
  5. Storing Files
  6. Deleting Files
  7. Directories
  8. Custom Filesystems

Mail

  1. Introduction
  2. Generating Mailables
  3. Writing Mailables
  4. Sending Mail
  5. Mail & Local Development
  6. Events

Notifications

  1. Introduction
  2. Creating Notifications
  3. Sending Notifications
  4. Mail Notifications
  5. Database Notifications
  6. Broadcast Notifications
  7. SMS Notifications
  8. Slack Notifications
  9. Notification Events
  10. Custom Channels

Queues

  1. Introduction
  2. Creating Jobs
  3. Dispatching Jobs
  4. Running The Queue Worker
  5. Supervisor Configuration
  6. Dealing With Failed Jobs
  7. Job Events
  8. Database

Database: Getting Started

  1. Introduction
  2. Running Raw SQL Queries
  3. Database Transactions

Database: Query Builder

  1. Introduction
  2. Retrieving Results
  3. Selects
  4. Raw Expressions
  5. Joins
  6. Unions
  7. Where Clauses
  8. Ordering, Grouping, Limit, & Offset
  9. Conditional Clauses
  10. Inserts
  11. Updates
  12. Deletes
  13. Pessimistic Locking

Pagination

  1. Introduction
  2. Basic Usage
  3. Displaying Pagination Results
  4. Customizing The Pagination View
  5. Paginator Instance Methods

Database: Migrations

  1. Introduction
  2. Generating Migrations
  3. Migration Structure
  4. Running Migrations
  5. Tables
  6. Columns
  7. Indexes

Database: Seeding

  1. Introduction
  2. Writing Seeders
  3. Running Seeders

Redis

  1. Introduction
  2. Interacting With Redis
  3. Pub / Sub
  4. Eloquent ORM

Eloquent: Getting Started

  1. Introduction
  2. Defining Models
  3. Retrieving Models
  4. Retrieving Single Models / Aggregates
  5. Inserting & Updating Models
  6. Deleting Models
  7. Query Scopes
  8. Events

Eloquent: Relationships

  1. Introduction
  2. Defining Relationships
  3. Querying Relations
  4. Eager Loading
  5. Inserting & Updating Related Models
  6. Touching Parent Timestamps

Eloquent: Collections

  1. Introduction
  2. Available Methods
  3. Custom Collections

Eloquent: Mutators

  1. Introduction
  2. Accessors & Mutators
  3. Date Mutators
  4. Attribute Casting

Eloquent: Serialization

  1. Introduction
  2. Serializing Models & Collections
  3. Hiding Attributes From JSON
  4. Appending Values To JSON
  5. Artisan Console

Console Commands

  1. Introduction
  2. Writing Commands
  3. Defining Input Expectations
  4. Command I/O
  5. Registering Commands
  6. Programatically Executing Commands

Task Scheduling

  1. Introduction
  2. Defining Schedules
  3. Task Output
  4. Task Hooks
  5. Testing

Testing

  1. Introduction
  2. Environment
  3. Creating & Running Tests

Application Testing

  1. Introduction
  2. Interacting With Your Application

Database Testing

  1. Introduction
  2. Resetting The Database After Each Test
  3. Writing Factories
  4. Using Factories

Mocking

  1. Introduction
  2. Events
  3. Jobs
  4. Mail Fakes
  5. Notification Fakes
  6. Facades
  7. Official Packages

Laravel Cashier

  1. Introduction
  2. Configuration
  3. Subscriptions
  4. Subscription Trials
  5. Handling Stripe Webhooks
  6. Handling Braintree Webhooks
  7. Single Charges
  8. Invoices

Envoy Task Runner

  1. Introduction
  2. Writing Tasks
  3. Running Tasks
  4. Notifications

API Authentication (Passport)

  1. Introduction
  2. Installation
  3. Configuration
  4. Issuing Access Tokens
  5. Password Grant Tokens
  6. Implicit Grant Tokens
  7. Client Credentials Grant Tokens
  8. Personal Access Tokens
  9. Protecting Routes
  10. Token Scopes
  11. Consuming Your API With JavaScript
  12. Events

Laravel Scout

  1. Introduction
  2. Installation
  3. Configuration
  4. Indexing
  5. Searching
  6. Custom Engines
  7. Appendix

Collections

  1. Introduction
  2. Available Methods
  3. Method Listing

Helper Functions

  1. Introduction
  2. Available Methods
  3. Method Listing
  4. Arrays
  5. Paths
  6. Strings
  7. URLs
  8. Miscellaneous

Package Development

  1. Introduction
  2. Service Providers
  3. Routing
  4. Resources
  5. Public Assets
  6. Publishing File Groups

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub