mirror of
https://github.com/v2board/v2board.git
synced 2024-11-14 07:29:13 +08:00
44 lines
999 B
PHP
44 lines
999 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Gate;
|
|
use Laravel\Horizon\Horizon;
|
|
use Laravel\Horizon\HorizonApplicationServiceProvider;
|
|
|
|
class HorizonServiceProvider extends HorizonApplicationServiceProvider
|
|
{
|
|
/**
|
|
* Bootstrap any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
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.
|
|
*
|
|
* @return void
|
|
*/
|
|
protected function gate()
|
|
{
|
|
Gate::define('viewHorizon', function ($user) {
|
|
return in_array($user->email, [
|
|
//
|
|
]);
|
|
});
|
|
}
|
|
}
|