1
I’m starting to understand Laravel’s routing system now, and I’ve come up with a question regarding the Middleware. Can I have two equal routings for the same vector where when my user is authenticated the return of this routing will be different? Example:
Route::get('/', function () {
return 'Página Inicial';
});
Route::group(['middleware' => 'auth'], function () {
Route::get('/', function () {
return 'Painel de controle do usuário autenticado';
});
});
If not possible, how best to modify a route function when there is a user ?