From 0496b71ab7a50c990161dc32812a3b2864e217d6 Mon Sep 17 00:00:00 2001 From: Matthew Hall Date: Sat, 16 Oct 2021 16:44:26 -0700 Subject: [PATCH] Adding Laravel Octane Support --- src/ToolServiceProvider.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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'); + }); } /**