Skip to content

Laravel Framework Textbook

A free, self-paced textbook in 7 chapters. Read a chapter, then drill it with the 170 companion flashcards using spaced repetition.

7 chapters · 170 cards · Updated

Chapters

  1. 1The HTTP Layer: Routing and Middleware

    Laravel routes are defined in routes/web.php for browser traffic or routes/api.php for stateless APIs. A route can return a view directly via a closure or point to a controller act...

  2. 2Eloquent ORM: Models, Relationships, and Querying

    Eloquent is Laravel's Active Record ORM: every database table maps to a Model class that provides an expressive, chainable query interface. Generate a model and its migration toget...

  3. 3Database Migrations, Schema, and Data Seeding

    Migrations are Laravel's version control for database schemas. Generate one with php artisan make:migration create_posts_table, define schema changes in up(), and put the inverse i...

  4. 4Blade Templates, Views, and Pagination

    Blade is Laravel's lightweight templating engine that augments HTML with shortcuts for PHP control flow, output escaping, and template inheritance. The double-brace syntax {{ $var...

  5. 5Authentication, Authorization, and Sessions

    Laravel provides two complementary authorization layers: gates (closures) and policies (classes). Define gates in AuthServiceProvider with Gate::define('update-post', function (Use...

  6. 6Queues, Events, Notifications, and Broadcasting

    Artisan is Laravel's command-line interface, and a set of common commands covers most daily tasks: serve for the dev server, migrate, make:model, tinker (interactive REPL powered b...

  7. 7Service Container, Facades, and Cross-Cutting Concerns

    Laravel's service container is the backbone of dependency injection. It resolves classes and their dependencies automatically, including all of Laravel's own components. Bind imple...

← Back to the Laravel Framework deck