diff --git a/src/ToolServiceProvider.php b/src/ToolServiceProvider.php index 6af9aad..3303364 100644 --- a/src/ToolServiceProvider.php +++ b/src/ToolServiceProvider.php @@ -6,6 +6,7 @@ use Illuminate\Support\ServiceProvider; use Laravel\Nova\Events\ServingNova; use Laravel\Nova\Nova; +use Laravel\Nova\Http\Middleware\Authenticate; use ShuvroRoy\NovaDynamicViews\Http\Middleware\Authorize; class ToolServiceProvider extends ServiceProvider @@ -23,7 +24,7 @@ protected function routes(): void return; } - Route::middleware(['nova', Authorize::class]) + Route::middleware(['nova', Authenticate::class, Authorize::class]) ->prefix('nova-vendor/nova-dynamic-views') ->group(__DIR__.'/../routes/api.php'); }