phpvms/database/seeds/DatabaseSeeder.php
2017-06-24 13:20:24 -05:00

25 lines
440 B
PHP
Executable File

<?php
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$env = App::environment();
$path = database_path('seeds/'.$env.'.yml');
if(!file_exists($path)) {
return;
}
$svc = app('App\Services\DatabaseService');
$svc->seed_from_yaml_file($path);
}
}