I am trying to have the same route homepage /
but different controllers for auth and guest users but i am unable to do this. I have searched and tried all the results on google, stackoverflow etc, none have worked. I am guessing it is because of the version i am using Laravel Framework 7.15
$uses = 'BlogController@index';
if (!is_null(auth()->user())) {
$uses = 'HomeController@index';
}
Route::get('/', $uses);
BlogController is for guest and HomeController is for authenticated users. So when i run the code for authenticated users it shows only shows the Blog(guest) homepage and not users HomeController page. Thanks for your help in advance.