Laravel 10 Official Documentation
Laravel 10 Official Documentation
Synced daily. A free ebook version of the Laravel 10.x Official Documentation.
About the Book
Table of Contents
-
- Prologue
- Getting Started
- Architecture Concepts
- The Basics
- Digging Deeper
- Security
- Database
- Eloquent ORM
- Testing
- Packages
-
Release Notes
- Versioning Scheme
- Support Policy
- Laravel 11
-
Upgrade Guide
- High Impact Changes
- Low Impact Changes
- Upgrading To 11.0 From 10.x {#upgrade-upgrade-11.0}
-
Contribution Guide
- Bug Reports
- Support Questions
- Core Development Discussion
- Which Branch?
- Compiled Assets
- Security Vulnerabilities
- Coding Style
- Code of Conduct
-
Installation
- Meet Laravel
- Creating A Laravel Project
- Initial Configuration
- Docker Installation Using Sail
- IDE Support
- Next Steps
-
Configuration
- Introduction
- Environment Configuration
- Accessing Configuration Values
- Configuration Caching
- Debug Mode
- Maintenance Mode
-
Directory Structure
- Introduction
- The Root Directory
- The App Directory
-
Laravel Homestead
- Introduction
- Installation & Setup
- Updating Homestead
- Daily Usage
- Debugging & Profiling
- Network Interfaces
- Extending Homestead
- Provider Specific Settings
-
Laravel Valet
- Introduction
- Installation
- Serving Sites
- Sharing Sites
- Site Specific Environment Variables
- Proxying Services
- Custom Valet Drivers
- Other Valet Commands
- Valet Directories & Files
-
Deployment
- Introduction
- Server Requirements
- Server Configuration
- Optimization
- Debug Mode
- Easy Deployment With Forge / Vapor
-
Request Lifecycle
- Introduction
- Lifecycle Overview
- Focus On Service Providers
-
Service Container
- Introduction
- Binding
- Resolving
- Method Invocation & Injection
- Container Events
- PSR-11
-
Service Providers
- Introduction
- Writing Service Providers
- Registering Providers
- Deferred Providers
-
Facades
- Introduction
- When To Use Facades
- How Facades Work
- Real-Time Facades
- Facade Class Reference
-
Contracts
- Introduction
- When To Use Contracts
- How To Use Contracts
- Contract Reference
-
Routing
- Basic Routing
- Route Parameters
- Named Routes
- Route Groups
- Route Model Binding
- Fallback Routes
- Rate Limiting
- Form Method Spoofing
- Accessing The Current Route
- Cross-Origin Resource Sharing (CORS)
- Route Caching
-
HTTP Redirects
- Creating Redirects
- Redirecting To Named Routes
- Redirecting To Controller Actions
- Redirecting With Flashed Session Data
-
Middleware
- Introduction
- Defining Middleware
- Registering Middleware
- Middleware Parameters
- Terminable Middleware
-
CSRF Protection
- Introduction
- Preventing CSRF Requests
- X-CSRF-TOKEN
- X-XSRF-TOKEN
-
Controllers
- Introduction
- Writing Controllers
- Controller Middleware
- Resource Controllers
- Dependency Injection & Controllers
-
HTTP Requests
- Introduction
- Interacting With The Request
- Input
- Input Trimming & Normalization
- Files
- Configuring Trusted Proxies
- Configuring Trusted Hosts
-
HTTP Responses
- Creating Responses
- Redirects
- Other Response Types
- Response Macros
-
Views
- Introduction
- Creating & Rendering Views
- Passing Data To Views
- View Composers
- Optimizing Views
-
URL Generation
- Introduction
- The Basics
- URLs For Named Routes
- URLs For Controller Actions
- Default Values
-
HTTP Session
- Introduction
- Interacting With The Session
- Session Blocking
- Adding Custom Session Drivers
-
Validation
- Introduction
- Validation Quickstart
- Form Request Validation
- Manually Creating Validators
- Working With Validated Input
- Working With Error Messages
- Available Validation Rules
- Conditionally Adding Rules
- Validating Arrays
- Validating Files
- Validating Passwords
- Custom Validation Rules
-
Error Handling
- Introduction
- Configuration
- The Exception Handler
- HTTP Exceptions
-
Logging
- Introduction
- Configuration
- Building Log Stacks
- Writing Log Messages
- Monolog Channel Customization
- Tailing Log Messages Using Pail
-
Blade Templates
- Introduction
- Displaying Data
- Blade Directives
- Components
- Anonymous Components
- Building Layouts
- Forms
- Stacks
- Service Injection
- Rendering Inline Blade Templates
- Rendering Blade Fragments
- Extending Blade
-
Asset Bundling (Vite)
- Introduction
- Installation & Setup
- Running Vite
- Working With JavaScript
- Working With Stylesheets
- Working With Blade & Routes
- Custom Base URLs
- Environment Variables
- Disabling Vite In Tests
- Server-Side Rendering (SSR)
- Script & Style Tag Attributes
- Advanced Customization
-
Localization
- Introduction
- Defining Translation Strings
- Retrieving Translation Strings
- Overriding Package Language Files
-
Frontend
- Introduction
- Using PHP
- Using Vue / React
- Bundling Assets
-
Starter Kits
- Introduction
- Laravel Breeze
- Laravel Jetstream
-
Laravel Mix
- Introduction
-
Laravel Octane
- Introduction
- Installation
- Server Prerequisites
- Serving Your Application
- Dependency Injection & Octane
- Concurrent Tasks
- Ticks & Intervals
- The Octane Cache
- Tables
-
Authentication
- Introduction
- Authentication Quickstart
- Manually Authenticating Users
- HTTP Basic Authentication
- Logging Out
- Password Confirmation
- Adding Custom Guards
- Adding Custom User Providers
- Events
-
Laravel Sanctum
- Introduction
- Installation
- Configuration
- API Token Authentication
- SPA Authentication
- Mobile Application Authentication
- Testing
-
Laravel Passport
- Introduction
- Installation
- Configuration
- Issuing Access Tokens
- Authorization Code Grant with PKCE
- Password Grant Tokens
- Implicit Grant Tokens
- Client Credentials Grant Tokens
- Personal Access Tokens
- Protecting Routes
- Token Scopes
- Consuming Your API With JavaScript
- Events
- Testing
-
Laravel Pennant
- Introduction
- Installation
- Configuration
- Defining Features
- Checking Features
- Scope
- Rich Feature Values
- Retrieving Multiple Features
- Eager Loading
- Updating Values
- Testing
- Adding Custom Pennant Drivers
- Events
-
Laravel Pint
- Introduction
- Installation
- Running Pint
- Configuring Pint
-
Precognition
- Introduction
- Live Validation
- Customizing Validation Rules
- Handling File Uploads
- Managing Side-Effects
- Testing
-
Prompts
- Introduction
- Installation
- Available Prompts
- Progress Bars
-
Laravel Sail
- Introduction
- Installation & Setup
- Starting & Stopping Sail
- Executing Commands
- Interacting With Databases
- File Storage
- Running Tests
- Previewing Emails
- Container CLI
- PHP Versions
- Node Versions
- Sharing Your Site
- Debugging With Xdebug
- Customization
-
Authorization
- Introduction
- Gates
- Creating Policies
- Writing Policies
- Authorizing Actions Using Policies
-
Email Verification
- Introduction
- Routing
- Customization
- Events
-
Encryption
- Introduction
- Configuration
- Using The Encrypter
-
Hashing
- Introduction
- Configuration
- Basic Usage
-
Resetting Passwords
- Introduction
- Routing
- Deleting Expired Tokens
- Customization
-
Artisan Console
- Introduction
- Writing Commands
- Defining Input Expectations
- Command I/O
- Registering Commands
- Programmatically Executing Commands
- Signal Handling
- Stub Customization
- Events
-
Broadcasting
- Introduction
- Server Side Installation
- Client Side Installation
- Concept Overview
- Defining Broadcast Events
- Authorizing Channels
- Broadcasting Events
- Receiving Broadcasts
- Presence Channels
- Model Broadcasting
- Client Events
- Notifications
-
Cache
- Introduction
- Configuration
- Cache Usage
- Atomic Locks
- Adding Custom Cache Drivers
- Events
-
Collections
- Introduction
- Available Methods
- Method Listing
- Higher Order Messages
- Lazy Collections
-
Events
- Introduction
- Registering Events & Listeners
- Defining Events
- Defining Listeners
- Queued Event Listeners
- Dispatching Events
- Event Subscribers
- Testing
-
File Storage
- Introduction
- Configuration
- Obtaining Disk Instances
- Retrieving Files
- Storing Files
- Deleting Files
- Directories
- Testing
- Custom Filesystems
-
Helpers
- Introduction
- Available Methods
- Arrays & Objects
- Paths
- URLs
- Miscellaneous
- Other Utilities
-
HTTP Client
- Introduction
- Making Requests
- Concurrent Requests
- Macros
- Testing
- Events
-
Mail
- Introduction
- Generating Mailables
- Writing Mailables
- Markdown Mailables
- Sending Mail
- Rendering Mailables
- Localizing Mailables
- Testing
- Mail & Local Development
- Events
- Custom Transports
-
Notifications
- Introduction
- Generating Notifications
- Sending Notifications
- Mail Notifications
- Markdown Mail Notifications
- Database Notifications
- Broadcast Notifications
- SMS Notifications
- Slack Notifications
- Localizing Notifications
- Testing
- Notification Events
- Custom Channels
-
Package Development
- Introduction
- Package Discovery
- Service Providers
- Resources
- Commands
- Public Assets
- Publishing File Groups
-
Processes
- Introduction
- Invoking Processes
- Asynchronous Processes
- Concurrent Processes
- Testing
-
Queues
- Introduction
- Creating Jobs
- Job Middleware
- Dispatching Jobs
- Job Batching
- Queueing Closures
- Running The Queue Worker
- Supervisor Configuration
- Dealing With Failed Jobs
- Clearing Jobs From Queues
- Monitoring Your Queues
- Testing
- Job Events
-
Rate Limiting
- Introduction
- Basic Usage
-
Strings
- Introduction
- Available Methods
- Strings
- Fluent Strings
-
Task Scheduling
- Introduction
- Defining Schedules
- Running The Scheduler
- Task Output
- Task Hooks
- Events
-
Database: Getting Started
- Introduction
- Running SQL Queries
- Database Transactions
- Connecting To The Database CLI
- Inspecting Your Databases
- Monitoring Your Databases
-
Database: Query Builder
- Introduction
- Running Database Queries
- Select Statements
- Raw Expressions
- Joins
- Unions
- Basic Where Clauses
- Ordering, Grouping, Limit & Offset
- Conditional Clauses
- Insert Statements
- Update Statements
- Delete Statements
- Pessimistic Locking
- Debugging
-
Database: Pagination
- Introduction
- Basic Usage
- Displaying Pagination Results
- Customizing The Pagination View
- Paginator / LengthAwarePaginator Instance Methods
- Cursor Paginator Instance Methods
-
Database: Migrations
- Introduction
- Generating Migrations
- Migration Structure
- Running Migrations
- Tables
- Columns
- Indexes
- Events
-
Database: Seeding
- Introduction
- Writing Seeders
- Running Seeders
-
Redis
- Introduction
- Configuration
- Interacting With Redis
- Pub / Sub
-
Eloquent: Getting Started
- Introduction
- Generating Model Classes
- Eloquent Model Conventions
- Retrieving Models
- Retrieving Single Models / Aggregates
- Inserting & Updating Models
- Deleting Models
- Pruning Models
- Replicating Models
- Query Scopes
- Comparing Models
- Events
-
Eloquent: Relationships
- Introduction
- Defining Relationships
- Many To Many Relationships
- Polymorphic Relationships
- Querying Relations
- Aggregating Related Models
- Eager Loading
- Inserting & Updating Related Models
- Touching Parent Timestamps
-
Eloquent: Collections
- Introduction
- Available Methods
- Custom Collections
-
Eloquent: Mutators & Casting
- Introduction
- Accessors & Mutators
- Attribute Casting
- Custom Casts
-
Eloquent: API Resources
- Introduction
- Generating Resources
- Concept Overview
- Writing Resources
- Resource Responses
-
Eloquent: Serialization
- Introduction
- Serializing Models & Collections
- Hiding Attributes From JSON
- Appending Values To JSON
- Date Serialization
-
Eloquent: Factories
- Introduction
- Defining Model Factories
- Creating Models Using Factories
- Factory Relationships
-
Testing: Getting Started
- Introduction
- Environment
- Creating Tests
- Running Tests
-
HTTP Tests
- Introduction
- Making Requests
- Testing JSON APIs
- Testing File Uploads
- Testing Views
- Available Assertions
- Validation Assertions
-
Console Tests
- Introduction
- Success / Failure Expectations
- Input / Output Expectations
- Console Events
-
Laravel Cashier (Stripe)
- Introduction
- Upgrading Cashier
- Installation
- Configuration
- Customers
- Payment Methods
- Subscriptions
- Subscription Trials
- Handling Stripe Webhooks
- Single Charges
- Invoices
- Checkout
- Handling Failed Payments
- Strong Customer Authentication
- Stripe SDK
- Testing
-
Laravel Dusk
- Introduction
- Installation
- Getting Started
- Browser Basics
- Interacting With Elements
- Available Assertions
- Pages
- Components
- Continuous Integration
-
Laravel Cashier (Paddle)
- Introduction
- Upgrading Cashier
- Installation
- Configuration
- Core Concepts
- Prices
- Customers
- Subscriptions
- Subscription Trials
- Handling Paddle Webhooks
- Single Charges
- Receipts
- Handling Failed Payments
- Testing
-
Database Testing
- Introduction
- Model Factories
- Running Seeders
- Available Assertions
-
Mocking
- Introduction
- Mocking Objects
- Mocking Facades
- Interacting With Time
-
Laravel Envoy
- Introduction
- Installation
- Writing Tasks
- Running Tasks
- Notifications
-
Laravel Folio
- Introduction
- Installation
- Creating Routes
- Route Parameters
- Route Model Binding
- Render Hooks
- Named Routes
- Middleware
- Route Caching
-
Laravel Fortify
- Introduction
- Installation
- Authentication
- Two Factor Authentication
- Registration
- Password Reset
- Email Verification
- Password Confirmation
-
Laravel Horizon
- Introduction
- Installation
- Upgrading Horizon
- Running Horizon
- Tags
- Notifications
- Metrics
- Deleting Failed Jobs
- Clearing Jobs From Queues
-
Laravel Passport
- Introduction
- Installation
- Configuration
- Issuing Access Tokens
- Authorization Code Grant with PKCE
- Password Grant Tokens
- Implicit Grant Tokens
- Client Credentials Grant Tokens
- Personal Access Tokens
- Protecting Routes
- Token Scopes
- Consuming Your API With JavaScript
- Events
- Testing
-
Laravel Scout
- Introduction
- Installation
- Configuration
- Database / Collection Engines
- Indexing
- Searching
- Custom Engines
-
Laravel Socialite
- Introduction
- Installation
- Upgrading Socialite
- Configuration
- Authentication
- Retrieving User Details
-
Laravel Telescope
- Introduction
- Installation
- Upgrading Telescope
- Filtering
- Tagging
- Available Watchers
- Displaying User Avatars
Causes Supported
Electronic Frontier Foundation
Defending your civil liberties in a digital world.
https://www.eff.org/Based in San Francisco, EFF is a donor-supported membership organization working to protect fundamental rights regardless of technology.
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 earnedover $13 millionwriting, 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