Skip to content
Advertisement

Can’t access the Auth::user() from a custom route file ? Laravel 7

For a purpose i decided to create a separate routing file for the admin and separating its logic from the web.php but instead i am facing this issue :

JavaScript

ps: the admin.php is registered in the RouteServiceProvider

JavaScript

Advertisement

Answer

Add web middleware

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement