Skip to content

Commit 19bf7ab

Browse files
Update helpers.php
1 parent f0be321 commit 19bf7ab

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/helpers.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
/**
55
* @return string|null
66
*/
7-
function getModelForGuard(string $guard)
7+
function getModelForGuard(string $guard): ?string
88
{
9-
return collect(config('auth.guards'))
10-
->map(fn ($guard) => isset($guard['provider']) ? config("auth.providers.{$guard['provider']}.model") : null)
11-
->get($guard);
9+
return Spatie\Permission\Guard::getModelForGuard($guard);
1210
}
11+
1312
}
1413

1514
if (! function_exists('setPermissionsTeamId')) {

0 commit comments

Comments
 (0)