From eb197eea564b0ed1bf3b9a96d6081548295b2387 Mon Sep 17 00:00:00 2001 From: Ruslan Bekenev Date: Wed, 21 Feb 2024 09:14:44 +1100 Subject: [PATCH] Scope config variable for laravel-generator and adminlte-templates --- src/InfyOmGeneratorServiceProvider.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/InfyOmGeneratorServiceProvider.php b/src/InfyOmGeneratorServiceProvider.php index 8de0df70..de1bfa57 100755 --- a/src/InfyOmGeneratorServiceProvider.php +++ b/src/InfyOmGeneratorServiceProvider.php @@ -62,9 +62,11 @@ public function boot() $this->registerCommands(); $this->loadViewsFrom(__DIR__.'/../views', 'laravel-generator'); - View::composer('laravel-generator::*', function ($view) { - $view->with(['config' => app(GeneratorConfig::class)]); - }); + foreach (['laravel-generator', 'adminlte-templates'] as $packageName) { + View::composer($packageName . '::*', function ($view) { + $view->with(['config' => app(GeneratorConfig::class)]); + }); + } Blade::directive('tab', function () { return '';