load core factories
This commit is contained in:
parent
5ebb67dd81
commit
9cab15afcd
|
|
@ -24,6 +24,8 @@ class CoreServiceProvider extends ServiceProvider
|
|||
|
||||
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
||||
|
||||
$this->registerEloquentFactoriesFrom(__DIR__ . '/../Database/Factories');
|
||||
|
||||
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'core');
|
||||
|
||||
Validator::extend('slug', 'Webkul\Core\Contracts\Validations\Slug@passes');
|
||||
|
|
@ -48,6 +50,7 @@ class CoreServiceProvider extends ServiceProvider
|
|||
{
|
||||
$this->registerFacades();
|
||||
}
|
||||
|
||||
/**
|
||||
* Register Bouncer as a singleton.
|
||||
*
|
||||
|
|
@ -62,4 +65,16 @@ class CoreServiceProvider extends ServiceProvider
|
|||
return app()->make(Core::class);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Register factories.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function registerEloquentFactoriesFrom($path): void
|
||||
{
|
||||
$this->app->make(EloquentFactory::class)->load($path);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue