How to Structure Laravel 12 Projects
Structuring Laravel projects is one of the most typical questions I see in the community. The reason...
We found 16 results for "how to structure Laravel project".
Structuring Laravel projects is one of the most typical questions I see in the community. The reason...
One of the most common questions I see about Laravel is how to structure the project. Or, in other words, where to put the logic out of the Controllers? In this article, I will try to show the options, trying to shorten one Controller method as an example.
Service Container is probably one of the most confusing topics for beginners in Laravel. The official docs explain it well but with a lot of "theoretical words". Let's get practical and I'll show the core practical examples you need to understand.
In this article, I will show you how to shorten Controllers by using Service classes, and different ways to initialize or inject that Service.
In this longer video, I will show examples of SOLID principles, specifically in Laravel projects.
Repository pattern is one of the most misunderstood topics in Laravel, and in this video, I will explain why.
What are Service Providers? How to use them? When/how to create your own one? Difference between register() and boot() methods? All the answers in this video.
Package to manage your large Laravel app using modules. Module is like a Laravel package, it has some views, controllers or models.
This is probably the no.1 debate in the Laravel community - "where should I put this code". Let me explain my philosophy, based on a practical example.
Service classes in Laravel is one of the most misunderstood concepts because developers use them in a very different way. Let's take a look at three examples.
A lot is written on the syntax of dependency injections and services. But let's talk about WHY and WHEN to use them, what are the actual benefits and in what cases.
Interfaces are one of the most confusing topics in OOP with Laravel. When/how specifically should they be used? Let's take a look at two examples.
Recently I've seen a few examples of app/Actions folder in Laravel projects. Let's take a look at what can be inside of it, and is it actually useful.
In a recent video, I've transformed Controller code into a Service class, and some people in the comments argued about using Traits instead. Let me comment on that example, adding a few more examples of Traits in other projects.
Example of moving code from Controller to Service and no.1 mistake developers make here.
We recently received this question below on Laravel Daily Discord. In short: how to structure Controllers? Should it be by roles?