Laravel course

A practical course that goes from installing the framework to three capstone projects. Every lesson is a manual: the code, the explanation of what it does, and the next step that follows from it. The course is written and published part by part: the cards below open the parts, and the tree lists the lessons that are ready to read.

The framework comes first, because a Laravel project is a skeleton before it is a program. Routes, controllers and Blade follow, then the database with migrations, Eloquent and relationships. Validation and login, the service container and Artisan, events, queues, mail and the cache come next, then security and the API, the everyday features, the tests, the data lessons in depth, and production. The last part builds a blog, a JSON API and a shop cart, one lesson at a time.

Start with What is Laravel and where it runs. For a short description of the framework read Laravel basics; other PHP topics are on the PHP page.

Laravel course: Getting started What Laravel is, a project created with Composer, the first route, controllers, Blade, and reusable Blade components: the framework and one working app. Open Laravel course: Database Migrations, Eloquent models, relationships, the query builder, and seeders and factories: the tables and the rows behind the pages. Open Laravel course: Validation and login Validation rules and form requests, the guards that log a user in, a hand-rolled login form, and middleware on routes and groups. Open Laravel course: Core tools The service container, the config and env helpers, and Artisan commands: the pieces every other part builds on. Open Laravel course: Background work and state Events and listeners, queued jobs and their workers, mail, the cache, and the session: the work that happens around the request. Open Laravel course: Security and API CSRF tokens, password hashing, Sanctum API tokens, API resources, and gates and policies: who may do what, and what a JSON client sees. Open Laravel course: Everyday features Notifications on mail and in the database, the scheduler and one cron line, the filesystem disks, and translated interface strings. Open Laravel course: Testing PHPUnit with a refreshed database, then HTTP tests that call routes, act as a user and assert JSON bodies and status codes. Open Laravel course: Data in depth Collections, Carbon dates, pagination, file uploads, query scopes, accessors and casts, and transactions with row locks. Open Laravel course: Production The deploy checklist, the debug toolbar, broadcasting over websockets, and full-text search: the app on a real server. Open Laravel course: Capstones and next steps Three capstone projects (a blog, a JSON API and a shop cart), a lesson on killing N+1 queries, and the modern Laravel tour. Open

All articles