Structure Laravel Project: Just PHP Classes? [EXAMPLE]

preview_player
Показать описание
Let's take a look at an interesting open-source example by Brent who created a Php/Livewire game.

Links mentioned in the video:

- - - - -
Support the channel by checking out my products:

- - - - -
Other places to follow:
Рекомендации по теме
Комментарии
Автор

This makes it clear for people who think that the default laravel structure is missing. It is still fine and ok to structure your app the way you want. I have seen a dev who uses laravel but does not use laravel controllers when writing his controllers.

billionsjoel
Автор

DDD naming/structuring is in all its beauty

MaksLobanov
Автор

For my projects I make Services folder and Repositories folder. Services is for logic classes. Repositories is for Data classes since I prefer to use DB facade instead of eloquent.

jaunalapa
Автор

if you are going to act alone any mistake is irrelevant but for some group work some convention is necessary. To validate an idea ok. For serious work it's a disaster 😊

daviMenezes
Автор

My biggest struggle when it comes to naming is whether to prefix/suffix a class.

For example, an enum class. Generally I would store it inside /app/enums/ but I struggle when it comes to naming it. Should I name it EnumStatus? Or should I name it StatusEnum? Or even, just plain Status.

errorlade
Автор

Laravel is open to flexibility and that's great but I would always go for a proper design pattern even conventional ones. the point here is so that i will be able to manage and scale my codebase without issues. in other words (KIS) Keep it Simple.

michaeladetona
Автор

I'm curious about the best way to structure a Laravel project that has multiple roles, such as admin, user, and super user. Specifically, I'm wondering about the best approach for organizing controllers and services. Can anyone provide any insights or recommendations? Thank you in advance!

Semicolon..
Автор

What does Final class really mean ive seen some videos but its not so clear to me can you maybe explain im a video in a practical example

kingstalker
Автор

Stick to Porto architecture pattern. But it's quite a big enterprise project I'm working on, so for most simple sites its structure seems to be overengeneered.

КириллКоншин-гк
Автор

I remember starting to learn a language or a framework by looking at its standard project structure. Without it there is no teamwork. A framework SHOULD impose some rules, that is the whole framework-ideology. Therefore the given example is a no-no.

iordachej
Автор

The only thing I'm not a fan of is the use of final classes. This makes mocking a class impossible. Important if you're testing

spicynoodle