#Error with my route group middleware configuration

3 messages · Page 1 of 1 (latest)

teal stump
#

Do you see anything wrong with my configuration? Why does it error?

Route::middleware(['auth'])->group(['prefix' => 'app'], function () {
    Route::get('/dashboard', \App\Http\Controllers\Dashboard\DashboardController::class)->name('app.dashboard');
});
#

I see it now. When using the ::middleware, ->group no longer has 2 parameters.

#

Whats the syntax to append prefix then?