1 / 11
Learn Laravel from your first route to a tested, secured, deployed application: routing, controllers, Blade, migrations and Eloquent, relationships, transactions and row locking, validation, authentication, policies, file storage, Livewire and Inertia, events, queues, mail and notifications…
Build, Test, and Deploy Modern PHP Web Applications
Read before you buy: the PDF here is a free sample — the first 20 pages of the 530-page book (payments, sales and reviews on this demo site are sample data). Get the full e-book at thenexbooks on Gumroad.
Learn Laravel the practical way, by building one real application from the first command to production.
Writing a PHP script is easy. Shipping a web application that a business depends on is not: members must log in securely, the last spot in a class must never be sold twice, payments must never be taken twice, reminders must go out on time, and when something breaks you need tests, logs, and a deployment you trust. Laravel gives you the tools for all of it — routing, Eloquent, validation, authentication, authorization, queues, mail, notifications, scheduling, APIs, and first-class testing — designed to work together.
This book teaches those tools in the order you need them. Every feature is introduced at the moment it solves a real problem in the application we are building, and we explain what Laravel does under the hood, so its conveniences never feel like magic you cannot debug.
What's inside
- Setting up Laravel with Herd, Sail, or plain PHP and Composer, and how an application is structured: bootstrap/app.php, service providers, configuration, and the request lifecycle
- Routing, controllers, the service container, middleware, and Blade layouts and components with safe output by default
- Migrations, factories, and seeders; Eloquent models, relationships, eager loading and the N+1 problem, casts, enums, scopes, accessors, and collections
- Transactions and row locking to enforce real rules: class capacity, a capped waitlist with automatic promotion, and a cancellation window
- Forms and validation with Form Requests, authentication (starter kits and a hand-built flow you fully understand), password resets, and authorization with gates and policies
- File uploads and storage disks, plus interactive pages with Vite, Livewire, and Inertia compared neutrally
- Events, listeners, and observers; queued jobs with retries and failure handling; mail, Markdown emails, and notifications
- Task scheduling, a payment gateway interface with idempotency keys and refunds, and signed webhook verification
- A versioned JSON API with API resources, pagination, consistent errors, Sanctum tokens with abilities, and rate limiting
- Testing with Pest and PHPUnit: HTTP and API tests, database assertions, fakes for mail, notifications, queues, and storage, and time travel for date-based rules
- Caching, performance, debugging tools, security hardening, environments, Sail and Docker, a complete Nginx + PHP-FPM VPS deployment with workers and zero-downtime releases, managed hosting options, monitoring, and backups
One running example, start to finish. You build the booking platform for Willowbend Yoga, a fictional studio with two rooms, three instructors, class passes and unlimited memberships, bookings with capacity and a waitlist, payments through a fictional gateway, automatic reminders, a staff admin area, and a JSON API for a mobile app. The sample data covers one week of classes and is small enough to check by hand, and the key business scenarios — a free cancellation that promotes the next member from the waitlist, a late cancellation that forfeits a credit — are worked through with exact numbers and turned into tests.
Current and honest. The book targets recent versions of Laravel on PHP 8.3 or newer and uses the streamlined application structure of recent releases. Where installer prompts, generated files, or defaults may differ between versions, it says so and points you to the official documentation instead of guessing. It contains no invented benchmarks or statistics. Every chapter includes complete code, Tips, Notes, Warnings, exercises, and Key Takeaways, and the appendices give you a cheat sheet, ready-to-adapt templates (Nginx, Supervisor, Dockerfile, CI, deploy script), a production checklist, and a glossary.
Format: PDF, 530 pages (A4), linked table of contents and bookmarks. English. First Edition, 2026. Published by thenexbooks. This book is independent and is not affiliated with, sponsored by, or endorsed by the Laravel project, Taylor Otwell, or The PHP Group.
Table of Contents
Part I — Laravel Foundations
- Ch 1 · Why Laravel? The Framework, the Ecosystem, and Your Setup
- Ch 2 · Anatomy of a Laravel Application: Structure, Configuration, and the Request Lifecycle
- Ch 3 · Routing: Routes, Parameters, Groups, and Named Routes
- Ch 4 · Controllers, Requests, Responses, and the Service Container
- Ch 5 · Blade Templates: Layouts, Components, and Safe Output
Part II — Data with Eloquent
- Ch 6 · Databases, Migrations, Factories, and Seeders
- Ch 7 · Eloquent Models: Querying, Creating, Updating, and Deleting
- Ch 8 · Eloquent Relationships and Eager Loading
- Ch 9 · Advanced Eloquent: Scopes, Casts, Enums, Accessors, and Collections
- Ch 10 · Transactions and Concurrency: Bookings, Capacity, and the Waitlist
Part III — Building the Web Application
- Ch 11 · Forms and Validation: Form Requests, Errors, and Old Input
- Ch 12 · Authentication: Starter Kits, Sessions, and Password Resets
- Ch 13 · Authorization: Gates, Policies, and Roles
- Ch 14 · File Storage and Uploads
- Ch 15 · Interactive Front Ends: Vite, Livewire, and Inertia
Part IV — Background Work and Integrations
- Ch 16 · Events, Listeners, and Observers
- Ch 17 · Queues and Jobs: Background Work Done Right
- Ch 18 · Mail and Notifications: Confirmations, Reminders, and Receipts
- Ch 19 · Scheduling, Payments, and Webhooks with a Fake Gateway
Part V — APIs, Testing, and Performance
- Ch 20 · Building a JSON API: Resources, Pagination, and Error Handling
- Ch 21 · API Authentication with Sanctum and Rate Limiting
- Ch 22 · Testing Fundamentals with Pest and PHPUnit
- Ch 23 · Testing in Depth: HTTP, Database, Fakes, and Time Travel
- Ch 24 · Caching, Performance, and Debugging
Part VI — Production
- Ch 25 · Security Hardening for Laravel Applications
- Ch 26 · Environments and Containers: Configuration, Sail, and Docker
- Ch 27 · Deploying to a VPS: Nginx, PHP-FPM, Workers, and Zero-Downtime Releases
- Ch 28 · Managed Hosting, Monitoring, and the Final Case Study
Appendices
A · Laravel Cheat Sheet
B · Templates and Reference
C · Production Checklist
D · Glossary
Book details
| Detail | |
|---|---|
| Pages | 530 |
| Format | PDF (A4) |
| Language | English |
| Level | Intermediate (basic PHP required) |
| Edition | 1st Edition (2026) |
| Download on this site | Free sample, first 20 pages (PDF) |
| Publisher | thenexbooks |
Files you get
No reviews yet. Only buyers can review.
More from thenexbooks