mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-22 23:50:33 +00:00
36 lines
898 B
PHP
36 lines
898 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\Facades\Gate;
|
|
use Laravel\Horizon\Horizon;
|
|
use Laravel\Horizon\HorizonApplicationServiceProvider;
|
|
|
|
class HorizonServiceProvider extends HorizonApplicationServiceProvider
|
|
{
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
parent::boot();
|
|
|
|
// Horizon::routeSmsNotificationsTo('15556667777');
|
|
// Horizon::routeMailNotificationsTo('example@example.com');
|
|
// Horizon::routeSlackNotificationsTo('slack-webhook-url', '#channel');
|
|
}
|
|
|
|
/**
|
|
* Register the Horizon gate.
|
|
*
|
|
* This gate determines who can access Horizon in non-local environments.
|
|
*/
|
|
protected function gate(): void
|
|
{
|
|
Gate::define('viewHorizon', function ($user) {
|
|
return in_array($user->email, [
|
|
//
|
|
]);
|
|
});
|
|
}
|
|
}
|