When the seeder is created by system A with command:
php artisan make:seeder LaravelSeeder
Then you can seed that seeder easily in system A with command:
php artisan db:seed --class=LaravelSeeder
But when the same seeder will be pushed and pulled in system B. Then it should not create again. And should be run directly with:
php artisan db:seed --class=LaravelSeeder
.
But when I run this command it says
Class LaravelSeeder does not exist
So I again create the same seeder with command php artisan make:seeder LaravelSeeder
.
Even after running this command it says Seeder already exists!.
- Why the Laravel seeder behave like that?
- Any solution to prevent from this?