We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08c8343 commit 9710d9aCopy full SHA for 9710d9a
app/Providers/AuthServiceProvider.php
@@ -13,6 +13,7 @@
13
use App\Policies\UserPolicy;
14
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
15
use Illuminate\Notifications\DatabaseNotification as Notification;
16
+use Illuminate\Support\Facades\Gate;
17
18
class AuthServiceProvider extends ServiceProvider
19
{
@@ -26,5 +27,8 @@ class AuthServiceProvider extends ServiceProvider
26
27
28
public function boot(): void
29
30
+ Gate::define('viewPulse', function (User $user) {
31
+ return $user->isAdmin();
32
+ });
33
}
34
0 commit comments