Setting the Authentication User Provider


You want to use a different user provider for authentication.


Use the Auth::setProvider() method.


The provider must implement Illuminate\Auth\UserProviderInterface.


This is an advanced topic.

Generally, the authentication driver you use will automatically set up the correct user provider.

But this method is available for customization. Make sure you call this method before the authentication routines are accessed. Either a service provider or in app/start/global.php is a good location.

comments powered by Disqus