Monday, May 22, 2017

Laravel 5.4 Routes

I currently have several routes in Laravel 5 but I want to combine them so instead of them being separate, I want them grouped, how can I do this?

Route::get('url1', function() {
    return Redirect::to('/');
}

Route::get('url2', function() {
    return Redirect::to('/');
}

Route::get('url3', function() {
    return Redirect::to('/');
}

How can I make just a single route so I dont have to repeat it like maybe:

Route::get('url1','url2','url3', function(){
    return Redirect::to('/');
});

Thank You.



via RaiN

Advertisement