Skip to content

Commit

Permalink
Update helpers.php for unlisted guard providers
Browse files Browse the repository at this point in the history
Adds to updates made in #640 and #643 related to Spark's empty list of guard providers.
  • Loading branch information
drbyte authored Sep 14, 2018
1 parent cf4f3af commit 11a4b1a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ function getModelForGuard(string $guard)
{
return collect(config('auth.guards'))
->map(function ($guard) {

if (! isset($guard['provider'])) {
return;
}

return config("auth.providers.{$guard['provider']}.model");
})->get($guard);
}
Expand Down

0 comments on commit 11a4b1a

Please sign in to comment.