FEATURE: prevent running some service providers in artisan
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Models\Settings;
|
||||
use Illuminate\Support\Facades\App;
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
@@ -15,6 +16,11 @@ class GlobalViewDataProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
// ignore running from artisan
|
||||
if (App::runningInConsole()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$settings = new Settings();
|
||||
|
||||
foreach ($settings->getForView() as $key => $value) {
|
||||
|
||||
Reference in New Issue
Block a user