diff --git a/src/CspServiceProvider.php b/src/CspServiceProvider.php index 351fa62..8b5935a 100644 --- a/src/CspServiceProvider.php +++ b/src/CspServiceProvider.php @@ -23,7 +23,9 @@ public function packageBooted() return app(NonceGenerator::class)->generate(); }); - $this->registerBladeDirectives(); + $this->callAfterResolving('view', function () { + $this->registerBladeDirectives(); + }); } private function registerBladeDirectives(): void