PHP and Laravel Cheat Sheet
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. The reference material consulted while preparing these pages is listed in the section bibliography. |
A single-page, colour-coded summary of PHP web development with Laravel, written against Laravel 13.x (13.34.0) on PHP
8.3 to 8.5 (versions verified 2026-10-05) — a plain PHP strip with the superglobals, output escaping, a PDO prepared
statement, session hardening, the upload checklist and PHP-FPM behind Nginx, the request lifecycle, the laravel new
and artisan command map (make:*, migrate:*, queue:*, install:*, optimize), a bootstrap/app.php
skeleton, routing with parameters, binding, groups and the resource route map, middleware, controller, request and
response one-liners, validation rules and a Form Request, Blade directives and component syntax, when to choose
Blade, Livewire or Inertia, migration columns, Eloquent queries, relationships, casts and eager loading,
authentication, policies and Sanctum tokens, queues, events, broadcasting and scheduling, cache, mail, notifications
and storage, a Pest HTTP test with the fakes, a deployment checklist, and a strip of what changed since older
tutorials — handy for quick memorization or as a downloadable PDF desk
reference.
For the full explanation, every option, and additional examples, see the dedicated pages:
Start here — PHP and Laravel.
Foundations — Introduction and Architecture.
Web development in plain PHP — The PHP Request Model and Servers, HTTP Requests and Responses, Forms, Validation and Output Escaping, Sessions and Cookies, File Uploads and Images, Databases with PDO, Authentication Without a Framework, Web Security Fundamentals, Templating, Routing and Middleware by Hand, and HTTP Clients, APIs and Email.
Laravel foundations — Laravel Getting Started, Directory Structure and Configuration, Request Lifecycle, Service Container, Providers and Facades, and Artisan, Tinker and Prompts.
HTTP layer — Routing, Middleware, Controllers, Requests, Input and Responses, Validation and Form Requests, Sessions, Cookies and Flash Data, and Error Handling and Logging.
Views and the front end — Blade Templates, Blade Components and Layouts, Vite and Frontend Assets, Livewire, and Inertia and Starter Kits.
Database and Eloquent — Database and Query Builder, Migrations, Seeders and Factories, Eloquent Models, Eloquent Relationships, Eloquent Casts, Accessors and Serialization, Collections and Pagination, Query Performance and N+1, and Redis, MongoDB and Search.
Security — Authentication, Authorization: Gates and Policies, API Authentication: Sanctum and Passport, and Security: CSRF, Encryption and Hashing.
APIs and integrations — Building APIs and API Resources, HTTP Client, and AI SDK, MCP and Boost.
Application services — Queues and Jobs, Events and Listeners, Broadcasting and Reverb, Task Scheduling, Mail and Notifications, Cache and Rate Limiting, File Storage and Images, Localization, and Processes, Concurrency and Context.
Testing — Testing and Browser Testing with Dusk.
Production and evolution — Deployment, Docker and Sail, Octane and Performance, Monitoring and Debugging, Package Development and Ecosystem, What’s Changed and Upgrading, and Best Practices.
References
The PDF summarizes the official documentation; each source is cited in full on the page listed above that covers it, and in the section bibliography.