-
Notifications
You must be signed in to change notification settings - Fork 179
Closed
Milestone
Description
From upgrade guide:
Custom Drivers
If you are using the Auth::extend method to define a custom method of retrieving users, you should now use Auth::provider to define your custom user provider. Once you have defined the custom provider, you may configure it in the providers array of your new auth.php configuration file.
For more information on custom authentication providers, consult the full authentication documentation.
Will become something like this:
$this->app->make('auth')->provider('doctrine', function ($app, $config) {
$entity = $config['model'];
$em = $app['registry']->getManagerForClass($entity);
if (!$em) {
throw new InvalidArgumentException("No EntityManager is set-up for {$entity}");
}
return new DoctrineUserProvider(
$app['hash'],
$em,
$entity
);
});
Metadata
Metadata
Assignees
Labels
No labels