As far as I know you can't do it like that. The routes can be cached in your application and therefore you can't make decisions based on the current role of the logged in user. However, you can easily do this in one controller
public function index()
{
if (auth()->user()->role === 'admin') {
return view('admin.dashboard');
}
return view('dashboard');
}
Another solution for this is having a dashboard route per role based on the url.
Route::prefix('admin')->middleware('role:admin')->group(function () {
Route::get('dashboard', 'DashboardController@index'); // example.com/admin/dashboard
});
Route::get('dashboard', 'HomeController@index'); // example.com/dashboard
This is way cleaner and more readable ;)