Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Brand3000's avatar

Register routes for Nova authentication

Hello! I have a group of routes which are said to be added in the web.php like so:

Route::group(['prefix' => 'laravel-util', 'middleware' => ['web', 'auth']], function () { Util::routes(); });

Instead of using 'middleware' => ['web', 'auth'], I want the Nova authentication would be checked and if any admin is logged in then all those routes would work. Without any Nova policy, just authentication.

Is it possible? Thanks in advance.

0 likes
1 reply
jeh5256's avatar

I have something similar in our Nova setup

Route::middleware(['nova', Authorize::class])
    ->prefix('nova-vendor/uploads')
    ->group(function () {
        Route::post('/upload', [UploadController::class, 'editorUpload']);
        Route::post('/upload-drop', [UploadController::class, 'editorDropUpload']);
    });

Please or to participate in this conversation.