mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-13 16:03:04 +00:00
37 lines
906 B
PHP
37 lines
906 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Support\Facades\Gate;
|
|
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');
|
|
|
|
// Horizon::night();
|
|
}
|
|
|
|
/**
|
|
* Register the Horizon gate.
|
|
*
|
|
* This gate determines who can access Horizon in non-local environments.
|
|
*/
|
|
protected function gate(): void
|
|
{
|
|
Gate::define('viewHorizon', function (User $user) {
|
|
return $user->hasPermissionTo('horizon.index');
|
|
});
|
|
}
|
|
}
|