I need to understand how I create routes with default values (it would be the default
we have in the switch
function of PHP). I'm looking for something like:
Route::group(['prefix' => '/'], ['as' => 'public'], function(){
Route::get('/{userid}', function () {
return 'Perfil publico do usuário';
});
//rota de exemplo do que estou procurando, esta seria a default
//caso o usuario não tenha buscado nenhum outro usuario no site
Route::get('/', function(){
return 'Página inicial do site'
});
});
What is the best method to generate this type of route? is there any default function for routing groups?