Check the documentation
Aug 18, 2016
8
Level 1
Migration fails because of service provider
Hello,
I have a Service Provider that loads all my global settings from a db table and puts it into the config
public function boot(Factory $cache, Setting $settings)
{
$settings = $cache->remember('settings', 3600, function() use ($settings)
{
return $settings->lists('config_value', 'name')->all();
});
config()->set('settings', $settings);
}
The problem is, when someone tries to setup the project the migration will not run because it throws an error because of the missing table. Is there a way to check if a migration is run or a table exists so that the migration works without constantly commenting the service provider out before migrating?
Please or to participate in this conversation.