Level 75
I use:
Route::middleware(['auth'])->group(function () {
.......
So group is still good. Still in docuenetation:
Prefixes in docs also:
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Is the Route::group syntax still supported in Laravel 9 - I was looking through the doc and couldn't find any specific mention but I see the method still exists on the class. I want to group middlewares, prefixes and namespaces together.
Route::group(['middleware' => ['auth'], 'namespace'=>'Admin', 'prefix'=>'admin'], function () { //Profile, About Route::get('profile/index', 'PersonalController@index')->name('admin.profile'); Route::view('about', 'admin.about')->name('admin.about'); });
Route::prefix('admin')->namespace('Admin')->middleware(['auth'])->group(function () {
//
});
Please or to participate in this conversation.