From 35eb60d38d479b4a492d4962fb40c4bea3962781 Mon Sep 17 00:00:00 2001 From: luanfreitasdev Date: Sun, 10 Nov 2024 12:44:52 -0300 Subject: [PATCH] Change default: false --- resources/config/livewire-powergrid.php | 2 +- src/Providers/PowerGridServiceProvider.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/config/livewire-powergrid.php b/resources/config/livewire-powergrid.php index c8202c95..d1e6a56f 100644 --- a/resources/config/livewire-powergrid.php +++ b/resources/config/livewire-powergrid.php @@ -149,5 +149,5 @@ | */ - 'auto_inject_assets' => true, + 'auto_inject_assets' => false, ]; diff --git a/src/Providers/PowerGridServiceProvider.php b/src/Providers/PowerGridServiceProvider.php index 8ed2d4b4..c0cd8605 100644 --- a/src/Providers/PowerGridServiceProvider.php +++ b/src/Providers/PowerGridServiceProvider.php @@ -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]); @@ -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); @@ -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')); + } }