added factories to provider stub

This commit is contained in:
denisdulici
2020-03-27 01:14:44 +03:00
parent 1756ffa4f4
commit dd14237ed2
2 changed files with 16 additions and 1 deletions

View File

@ -16,6 +16,7 @@ class $NAME$ extends Provider
$this->loadViews();
$this->loadTranslations();
$this->loadMigrations();
$this->loadFactories();
}
/**
@ -58,6 +59,20 @@ class $NAME$ extends Provider
$this->loadMigrationsFrom(__DIR__ . '/../$MIGRATIONS_PATH$');
}
/**
* Load factories.
*
* @return void
*/
public function loadFactories()
{
if (app()->environment('production') || !app()->runningInConsole()) {
return;
}
$this->loadFactoriesFrom(__DIR__ . '/../$FACTORIES_PATH$');
}
/**
* Load routes.
*