1

I just upgraded my app from Laravel 5.2 to 5.3 and followed all the steps. The one that seems to be the cause of the issue I'm facing is Auth Middleware. I did change the class that should be executed. But for some reason, all the routes are returning "Unauthenticated" error.

I'm not fetching logged in user in the constructor of any controller class. In fact, none of my controller class have a constructor. What can be causing this problem?

Ashit Vora
  • 2,902
  • 2
  • 27
  • 39

2 Answers2

1

Adding "web" middleware wherever I've "auth" middleware solved the problem.

Ashit Vora
  • 2,902
  • 2
  • 27
  • 39
1

The two default authentication controllers provided with the framework have been split into four smaller controllers. This change provides cleaner, more focused authentication controllers by default. The easiest way to upgrade your application to the new authentication controllers is to grab a fresh copy of each controller from GitHub and place them into your application.

You should also make sure that you are calling the Auth::routes() method in your routes/web.php file. This method will register the proper routes for the new authentication controllers.

Once these controllers have been placed into your application, you may need to re-implement any customizations you made to these controllers. For example, if you are customizing the authentication guard that is used for authentication, you may need to override the controller's guard method. You can examine each authentication controller's trait to determine which methods to override.

From laravel 5.2 to 5.3

Vikas Rinvi
  • 1,158
  • 12
  • 28