Black Friday: coupon FRIDAY24 for 40% off Yearly/Lifetime membership! Read more here
Courses

How to Structure Laravel 9 Projects

  • 30 lessons
  • 2 h 08 min

This content is available only for premium members.

About this course

NOTICE. We have a newer updated text-based course on this topic: How to Structure Laravel 11 Projects


The most often question I hear in Laravel is this: “Where should I put this code logic?”

Basic Laravel is an MVC framework, it’s clear what should be in Model, View, and Controller. But what if you have custom logic for processing data before passing it to the view? Where should it be?

  • In the same Controller method?
  • Function in the Model?
  • Separate class, like Service? Or Action?
  • Put as a Job into the Queue?
  • Or, maybe, a global helper function without any class?

And the list goes on.

Of course, the correct answer is it depends. But depends on what? This is what I’m gonna talk about in this course.

The goal is to discuss practical examples of structuring larger Laravel applications, various approaches, and patterns. We will analyze existing popular open-source projects and their structure.

Testimonials from the comments:

Testimonials about Structure course

Notice: this course won’t be about design patterns. So fancy keywords like Singleton, Factory, Adapter etc will be used only when appropriate. What I will try to do is focus on the practical side: folders, classes, and methods, and not on how that pattern actually is called in theory. In reality, every project is actually a mix of patterns, and developers don’t even know what they’re called.