2024-05-13 18:55:34 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
2024-06-19 13:20:51 -04:00
|
|
|
use App\Models\User;
|
|
|
|
use Illuminate\Support\Facades\Gate;
|
2024-05-13 18:55:34 -04:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Register any application services.
|
|
|
|
*/
|
|
|
|
public function register(): void
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bootstrap any application services.
|
|
|
|
*/
|
|
|
|
public function boot(): void
|
|
|
|
{
|
2024-06-19 13:20:51 -04:00
|
|
|
// This gate determines who can access the Pulse dashboard.
|
|
|
|
Gate::define('viewPulse', function (User $user) {
|
|
|
|
return $user->isAdmin();
|
|
|
|
});
|
2024-05-13 18:55:34 -04:00
|
|
|
}
|
|
|
|
}
|