Heimdall/app/Providers/AppServiceProvider.php

35 lines
705 B
PHP
Raw Normal View History

2018-01-26 14:35:01 +00:00
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Artisan;
2018-01-26 14:35:01 +00:00
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
2018-01-29 20:14:40 +00:00
if(!file_exists(database_path(env('DB_DATABASE')))) {
// first time setup
touch(database_path(env('DB_DATABASE')));
Artisan::call('migrate', array('--path' => 'database/migrations', '--force' => true));
2018-02-02 15:16:55 +00:00
Artisan::call('storage:link');
2018-01-29 20:14:40 +00:00
}
2018-01-26 14:35:01 +00:00
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}