Laravel 5.1 - Organization of factories

This seems to be a pretty simple question, but with Laravels (5.1) model factories , do I have to place each model definition inside one ModelFactory.phpfile?

If, for example, I have 200 different models, I can see that this file ( Database\Factories\ModelFactory.php) becomes very large and cluttered.

My question is:

Is there a better way to organize model factories, or should I define them all in one file? What is the practice?

+4
source share
1 answer

, , (/) . , , , .

+10

Source: https://habr.com/ru/post/1616086/


All Articles