Leanpub Header

Skip to main content

Laravel 5.2 Docs

This book is an up-to-date compilation of the official documentation pages, for 5.2.x version of Laravel, hosted on http://laravel.com/docs 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
622
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.2
  3. Laravel 5.1.11
  4. Laravel 5.1.4
  5. Laravel 5.1
  6. Laravel 5.0
  7. Laravel 4.2
  8. Laravel 4.1

Upgrade Guide

  1. Upgrading To 5.2.0 From 5.1
  2. Upgrading To 5.1.11
  3. Upgrading To 5.1.0
  4. Upgrading To 5.0.16
  5. Upgrading To 5.0 From 4.2
  6. Upgrading To 4.2 From 4.1
  7. Upgrading To 4.1.29 From <= 4.1.x
  8. Upgrading To 4.1.26 From <= 4.1.25
  9. 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. Setup

Installation

  1. Installation

Configuration

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

Laravel Homestead

  1. Introduction
  2. Installation & Setup
  3. Daily Usage
  4. Network Interfaces

Laravel Valet

  1. Introduction
  2. Installation
  3. Release Notes
  4. Serving Sites
  5. Sharing Sites
  6. Viewing Logs
  7. Custom Valet Drivers
  8. Other Valet Commands
  9. Tutorials

Basic Task List

  1. Introduction
  2. Installation
  3. Prepping The Database
  4. Routing
  5. Building Layouts & Views
  6. Adding Tasks
  7. Deleting Tasks

Intermediate Task List

  1. Introduction
  2. Installation
  3. Prepping The Database
  4. Routing
  5. Building Layouts & Views
  6. Adding Tasks
  7. Displaying Existing Tasks
  8. Deleting Tasks
  9. The Basics

HTTP Routing

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

HTTP Middleware

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

HTTP Controllers

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

HTTP Requests

  1. Accessing The Request
  2. Retrieving Input

HTTP Responses

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

Views

  1. Basic Usage
  2. View Composers

Blade Templates

  1. Introduction
  2. Template Inheritance
  3. Displaying Data
  4. Control Structures
  5. Stacks
  6. Service Injection
  7. Extending Blade
  8. Architecture Foundations

Request Lifecycle

  1. Introduction
  2. Lifecycle Overview
  3. Focus On Service Providers

Application Structure

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

Service Providers

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

Service Container

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

Facades

  1. Introduction
  2. Using Facades
  3. Facade Class Reference
  4. Services

Authentication

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

Authorization

  1. Introduction
  2. Defining Abilities
  3. Checking Abilities
  4. Policies
  5. Controller Authorization

Artisan Console

  1. Introduction
  2. Writing Commands
  3. Command I/O
  4. Registering Commands
  5. Calling Commands Via Code

Laravel Cashier

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

Cache

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

Collections

  1. Introduction
  2. Available Methods
  3. Method Listing

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. Calling Existing Gulp Tasks
  10. Writing Elixir Extensions

Encryption

  1. Configuration
  2. Basic Usage

Errors & Logging

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

Events

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

Filesystem / Cloud Storage

  1. Introduction
  2. Configuration
  3. Basic Usage
  4. Custom Filesystems

Hashing

  1. Introduction
  2. Basic Usage

Helper Functions

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

Localization

  1. Introduction
  2. Basic Usage
  3. Overriding Vendor Language Files

Mail

  1. Introduction
  2. Sending Mail
  3. Mail & Local Development
  4. Events

Package Development

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

Pagination

  1. Introduction
  2. Basic Usage
  3. Displaying Results In A View
  4. Converting Results To JSON

Queues

  1. Introduction
  2. Writing Job Classes
  3. Pushing Jobs Onto The Queue
  4. Running The Queue Listener
  5. Dealing With Failed Jobs

Redis

  1. Introduction
  2. Basic Usage
  3. Pub / Sub

Session

  1. Introduction
  2. Basic Usage
  3. Adding Custom Session Drivers

Envoy Task Runner

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

Task Scheduling

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

Testing

  1. Introduction
  2. Application Testing
  3. Working With Databases
  4. Mocking

Validation

  1. Introduction
  2. Validation Quickstart
  3. Other Validation Approaches
  4. Working With Error Messages
  5. Available Validation Rules
  6. Conditionally Adding Rules
  7. Custom Validation Rules
  8. Database

Database: Getting Started

  1. Introduction
  2. Running Raw SQL Queries
  3. Database Transactions
  4. Using Multiple Database Connections

Database: Query Builder

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

Database: Migrations

  1. Introduction
  2. Generating Migrations
  3. Migration Structure
  4. Running Migrations
  5. Writing Migrations

Database: Seeding

  1. Introduction
  2. Writing Seeders
  3. Running Seeders
  4. Eloquent ORM

Eloquent: Getting Started

  1. Introduction
  2. Defining Models
  3. Retrieving Multiple 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. Inserting Related Models

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. Basic Usage
  3. Hiding Attributes From JSON
  4. Appending Values To JSON

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