From 49b01bdb7593f2ff0021b16944efb5cc9dae7616 Mon Sep 17 00:00:00 2001 From: KodeStar Date: Thu, 1 Feb 2018 20:13:58 +0000 Subject: [PATCH] Automatically generate database on first load --- app/Providers/AppServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 219186be..35746227 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -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)); } }