DEV Community

Discussion on: Multiple role-based authentication in Laravel

Collapse
 
omaresmael profile image
omaresmael • Edited

It was a beautiful tutorial, there is a routing refactor must be done tho, in order to function properly in laravel 8

Route::get('/player', [PlayerController::class,'index'])->name('player')->middleware('player');

instead of

Route::get('/player', 'PlayerController@index')->name('player')->middleware('player');

there are other ways to solve this problem but that just my favorite one