Skip to content

Commit

Permalink
Scope config variable for laravel-generator and adminlte-templates
Browse files Browse the repository at this point in the history
  • Loading branch information
krydos committed Feb 20, 2024
1 parent a63c429 commit 554ad5c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/InfyOmGeneratorServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<?php echo infy_tab() ?>';
Expand Down

0 comments on commit 554ad5c

Please sign in to comment.