r/laravel • u/davorminchorov • 18d ago
Building Maintainable PHP Applications: Patterns and Principles
https://codyssey.dev/courses/building-maintainable-php-applications-patterns-and-principlesHey all,
I wrote a free course about a bunch of the most popular and most hated design patterns and principles with realistic examples in PHP (Laravel and Symfony).
There are a few of them that are missing but I’ll add them as a bonus at some point or maybe a separate course.
Let me know what you think.
Thanks.
60
Upvotes
11
u/prateekshawebdesign 14d ago
One pattern that consistently keeps medium to large Laravel applications clean without over-engineering is adopting single-action classes combined with dedicated Form Requests. The classic repository pattern often ends up duplicating Eloquent's built-in query builder methods for zero practical benefit unless you are swapping persistence layers. Encapsulating complex business operations in single Invokable action classes keeps controllers to two lines of code, makes unit testing straightforward, and avoids bloated 2,000-line Eloquent models.
2
u/kryptoneat 13d ago
Can you please disclose AI use for the writing of this course ?