The Laravel Best Practices course is live
Laravel Best Practices: Writing Laravel That Lasts is live. Every chapter and lesson is published, and the course is free. It's marked intermediate.
What the course is about
Every shortcut in a controller is free for the first caller and paid by the second. The course starts with a controller that has taken reservations since launch and works fine, until reservations start arriving from a second source, a channel manager's import, and nothing in ReservationController::store() can be reused.
Each lesson takes one habit that caused that, shows what it costs in the reservation code and replaces it. An observer saves the same reservation four times. Auth::user() sits inside a use case, so it only runs for a logged-in web request. Arrays travel through the code with no type to say what is in them.
You're the reader if you've shipped Laravel features for a year or two and know controllers, Eloquent, Form Requests, queues, mailables and Artisan commands. Use case classes, command buses, DTOs and value objects can be new to you. The course introduces each one when the code needs it.
What's inside
| Chapter | What it covers |
|---|---|
| Introduction | A second caller arrives, and nothing in the reservation controller can be reused |
| Queries and Data Access | One write per use case, eager loading at the query site, and reporting in SQL |
| Architecture and Code Organization | Moving the reservation flow out of the controller into a use case class, injecting what it needs, and giving it a module of its own |
| Request Handling and API Design | Naming every field the handler writes, casting what the request sends, and giving each intent its own endpoint and request class |
| Primitives and Value Objects | Stopping arrays at the edge, keeping models out of the queue and the pricing class, and giving dates, money and guest counts a type |
| Conclusion | The channel import ships through the same handler as the web form, with a test that never touches HTTP |
One codebase from start to finish
The whole course runs on one hotel reservation system. Each lesson opens on the code the previous one left, so you watch the same classes change instead of reading unrelated snippets. The last lesson ships the channel import on the same handler the web form uses, and tests it without making an HTTP request.
Five free insights to go with it
Five insights are live today and link to the course. Each one takes a single angle on the same habits:
- Top 20 Mistakes Laravel Developers Make is the overview, and each mistake points to the lesson that fixes it.
- Why Your Laravel App Is Slow covers writes, eager loading and reporting queries.
- Why Your Laravel Codebase Is Unmaintainable covers how the code is organized.
- Stop Writing Laravel APIs Like This covers request handling and endpoints.
- Your Laravel Code Needs More Objects covers value objects and typed data.
Free content keeps coming
Insights and quick tips stay free to read, and new free courses, learning paths, code reviews, insights, quick tips and projects keep being released alongside the paid catalogue.
Follow along
New content is announced on X, Bluesky, LinkedIn, Facebook, Instagram, as well as the newsletter as it publishes.