I have admin
prefix where url/admin/dashboard
is my dashboard view.
What I need is to redirect users to url above if they type only url/admin
.
This is what I have:
Route::prefix('admin')->group(function () {
Route::get('dashboard', 'HomeController@index')->name('dashboard'); //works
Route::get('/', function () {
return redirect()->route('dashboard');
}); //doesn't work
});