diff --git a/src/ToolServiceProvider.php b/src/ToolServiceProvider.php index 5396963..b633f02 100644 --- a/src/ToolServiceProvider.php +++ b/src/ToolServiceProvider.php @@ -4,6 +4,7 @@ use Laravel\Nova\Nova; use Illuminate\Support\ServiceProvider; +use Laravel\Nova\Events\ServingNova; class ToolServiceProvider extends ServiceProvider { @@ -14,7 +15,9 @@ class ToolServiceProvider extends ServiceProvider */ public function boot() { - Nova::script('detached-actions', __DIR__. '/../dist/js/tool.js'); + Nova::serving(function (ServingNova $event) { + Nova::script('detached-actions', __DIR__. '/../dist/js/tool.js'); + }); } /**