Skip to content

Commit 8e268a3

Browse files
Merge pull request #265 from rginnow/fix-auth-gate-not-found-error
Add missing namespace to Gate in auth template
2 parents ed63c57 + 2eba3cd commit 8e268a3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

php-templates/auth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
\Illuminate\Foundation\Auth\User::class,
1010
]))
1111
->flatMap(fn($class) => [
12-
$class => Gate::getPolicyFor($class),
12+
$class => \Illuminate\Support\Facades\Gate::getPolicyFor($class),
1313
])
1414
->filter(fn($policy) => $policy !== null);
1515

src/templates/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ $modelPolicies = collect(get_declared_classes())
99
\\Illuminate\\Foundation\\Auth\\User::class,
1010
]))
1111
->flatMap(fn($class) => [
12-
$class => Gate::getPolicyFor($class),
12+
$class => \\Illuminate\\Support\\Facades\\Gate::getPolicyFor($class),
1313
])
1414
->filter(fn($policy) => $policy !== null);
1515

0 commit comments

Comments
 (0)