Closed gotrecillo closed 6 years ago
I too got this error and deleted my unused app version of the seeder.
But when trying to understand it I have become confused as to how the SettingsTableSeeder.php in the package gets invoked.
SettingsServiceProvider.php (Lines 49-50) contains:
// publish the migrations and seeds
$this->publishes([__DIR__.'/database/migrations/' => database_path('migrations')], 'migrations');
Which explains how the migrations
are discovered, but the seeds
folder is a sibling of migrations and not explicitly referenced in the server provider.
I am using Laravel 5.6, is this possibly a bug caused by the auto-discovery feature added in 5.6?
Hi guys,
In the Settings installation, developers are not instructed to publish the seeds. Only to run them from the package. I personally think this is the way the installation should be, since the seeds aren't exactly necessary. They're just some demo entries, so you can get started. So no need to copy them in your project, so that they're run on staging/production.
Wouldn't you agree?
Thanks, cheers!
I'll close the issue for now. Reopen or reply if you think I'm wrong to do so. I make mistakes all the time.
Cheers!
Just to clarify, I have not published the seeder in my application. The version in the composer library just gets discovered and run somehow! I do not know enough about Laravel 5.6 to know how it's managing to run. I am guessing from your response this is not intended behaviour.
After
I am getting this error in composer.
What about removing the namespace in the seeder published so there is no conflict ?