mirror of
https://github.com/linuxserver/Heimdall.git
synced 2026-02-21 20:20:34 +09:00
Automatically generate database on first load
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Artisan;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
@@ -15,9 +16,8 @@ class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
if(!file_exists(database_path(env('DB_DATABASE')))) {
|
||||
// first time setup
|
||||
//die("No Database");
|
||||
touch(database_path(env('DB_DATABASE')));
|
||||
\Artisan::call('migrate', array('--path' => 'app/migrations', '--force' => true));
|
||||
Artisan::call('migrate', array('--path' => 'database/migrations', '--force' => true));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user