|
@ -4,6 +4,7 @@ namespace App\Providers; |
|
|
|
|
|
|
|
|
use Illuminate\Support\ServiceProvider; |
|
|
use Illuminate\Support\ServiceProvider; |
|
|
use Artisan; |
|
|
use Artisan; |
|
|
|
|
|
use Schema; |
|
|
use App\Setting; |
|
|
use App\Setting; |
|
|
|
|
|
|
|
|
class AppServiceProvider extends ServiceProvider |
|
|
class AppServiceProvider extends ServiceProvider |
|
@ -27,6 +28,7 @@ class AppServiceProvider extends ServiceProvider |
|
|
//Artisan::call('route:cache'); |
|
|
//Artisan::call('route:cache'); |
|
|
} |
|
|
} |
|
|
if(is_file(database_path(env('DB_DATABASE')))) { |
|
|
if(is_file(database_path(env('DB_DATABASE')))) { |
|
|
|
|
|
if(Schema::hasTable('settings')) { |
|
|
if($bg_image = Setting::fetch('background_image')) { |
|
|
if($bg_image = Setting::fetch('background_image')) { |
|
|
$alt_bg = ' style="background-image: url('.asset('storage/'.$bg_image).')"'; |
|
|
$alt_bg = ' style="background-image: url('.asset('storage/'.$bg_image).')"'; |
|
|
} |
|
|
} |
|
@ -38,6 +40,7 @@ class AppServiceProvider extends ServiceProvider |
|
|
Artisan::call('migrate', array('--path' => 'database/migrations', '--force' => true, '--seed' => true)); |
|
|
Artisan::call('migrate', array('--path' => 'database/migrations', '--force' => true, '--seed' => true)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
view()->share('alt_bg', $alt_bg); |
|
|
view()->share('alt_bg', $alt_bg); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|