S
S
Sharov Dmitry2015-05-22 13:37:37
Laravel
Sharov Dmitry, 2015-05-22 13:37:37

To the signs of Laravel v5, why are the models not in a separate directory?

The subject is in the title of the question. I'll explain a little.
If you create new models through the console, then they go straight to the app folder, why didn’t they create (of course, no one forbids us to do it manually and write the namespace App\Models\MyModel) a separate Models directory?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
D', 2015-05-22
@Denormalization

This is Taylor's personal quirk. They wrote about it from the alpha, but he scored on everyone.
Since version 4, there have been shifts towards "1 folder - 1 entity". That is, it was planned that each entity (model) + its binding would be in separate folders.
But then somehow everything began to spin, Taylor redid the structure of everything and everything, but he did not select a folder for the models.

2
2vtlk, 2015-05-22
@2vtlk

The framework is a universal thing, for example, I have projects where there is not a single model. Therefore, they are not needed there.3NVMnB

O
OnYourLips, 2015-05-22
@OnYourLips

why the models are not in a separate directory
Because you don't put them in a separate directory.
You can put. You can even create a directory hierarchy.
This is your choice, the framework does not limit you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question