Skip to content

Commit

Permalink
Change default: false
Browse files Browse the repository at this point in the history
  • Loading branch information
luanfreitasdev committed Nov 10, 2024
1 parent 2a3581c commit 35eb60d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion resources/config/livewire-powergrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,5 @@
|
*/

'auto_inject_assets' => true,
'auto_inject_assets' => false,
];
12 changes: 6 additions & 6 deletions src/Providers/PowerGridServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class PowerGridServiceProvider extends ServiceProvider

public function boot(): void
{
$this->shouldInject() && AssetManager::register(new InjectAssets());
$this->shouldInjectAssets() && AssetManager::register(new InjectAssets());

if ($this->app->runningInConsole()) {
$this->commands([UpdateCommand::class]);
Expand Down Expand Up @@ -73,11 +73,6 @@ public function register(): void
Macros::builder();
}

public function shouldInject(): bool
{
return boolval(config('livewire-powergrid.auto_inject_assets'));
}

private function publishViews(): void
{
$this->loadViewsFrom(__DIR__ . '/../../resources/views', $this->packageName);
Expand All @@ -102,4 +97,9 @@ private function publishConfigs(): void

$this->publishes([__DIR__ . '/../../resources/lang' => lang_path('vendor/' . $this->packageName)], $this->packageName . '-lang');
}

private function shouldInjectAssets(): bool
{
return boolval(config('livewire-powergrid.auto_inject_assets'));
}
}

0 comments on commit 35eb60d

Please sign in to comment.