You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My model files are groupped in subfolders inside App\Models in laravel 7.
Example:
App\Models\Administration (contains any models related to access control and permissions)
App\Models\Sales (models related to the sales sector) .
If i want to seed them in laravel 8 i've to use them with HasFactory trait.
So as the framework suggests, i created my factories inside Database\Factories
The "problem" i found is that while seeding laravel points my model factories inside
Database\Factories\Adminstration\MyFactory.php
or
Database\Factories\Sales\MyOtherFactory.php
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My model files are groupped in subfolders inside App\Models in laravel 7.
Example:
App\Models\Administration (contains any models related to access control and permissions)
App\Models\Sales (models related to the sales sector) .
If i want to seed them in laravel 8 i've to use them with HasFactory trait.
So as the framework suggests, i created my factories inside Database\Factories
The "problem" i found is that while seeding laravel points my model factories inside
Database\Factories\Adminstration\MyFactory.php
or
Database\Factories\Sales\MyOtherFactory.php
Beta Was this translation helpful? Give feedback.
All reactions