diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 35471f6f..219186be 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -13,7 +13,12 @@ class AppServiceProvider extends ServiceProvider */ public function boot() { - // + 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)); + } } /** diff --git a/config/database.php b/config/database.php index 8e78cee3..f2f0ab1d 100644 --- a/config/database.php +++ b/config/database.php @@ -36,7 +36,7 @@ return [ 'sqlite' => [ 'driver' => 'sqlite', //'database' => env('DB_DATABASE', database_path('database.sqlite')), - 'database' => database_path(env('DB_DATABASE')) + 'database' => database_path(env('DB_DATABASE')), 'prefix' => '', ], diff --git a/resources/views/app.blade.php b/resources/views/app.blade.php new file mode 100644 index 00000000..1c84435a --- /dev/null +++ b/resources/views/app.blade.php @@ -0,0 +1,36 @@ + + + + + + + + {{ config('app.name') }} + + + + + +
+ +
+
+ test +
+
+ @yield('content') +
+ + +
+
+ + diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index 53208c2c..bd74bae8 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -1,38 +1,10 @@ - - - - - - +@extends('app') - {{ config('app.name') }} +@section('content') - - - - -
- -
-
- test -
-
Item
-
- -
-
- - + +@endsection \ No newline at end of file