Issues (364)

app/Providers/HorizonServiceProvider.php (1 issue)

Severity
1
<?php
2
3
namespace App\Providers;
4
5
use Illuminate\Support\Facades\Gate;
6
use Laravel\Horizon\Horizon;
7
use Laravel\Horizon\HorizonApplicationServiceProvider;
8
9
class HorizonServiceProvider extends HorizonApplicationServiceProvider
10
{
11
    public function boot()
12
    {
13
        parent::boot();
14
15
        // Horizon::routeSmsNotificationsTo('15556667777');
16
        // Horizon::routeMailNotificationsTo('[email protected]');
17
        // Horizon::routeSlackNotificationsTo('slack-webhook-url', '#channel');
18
19
        Horizon::night();
0 ignored issues
show
Deprecated Code introduced by
The function Laravel\Horizon\Horizon::night() has been deprecated. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

19
        /** @scrutinizer ignore-deprecated */ Horizon::night();
Loading history...
20
    }
21
22
    protected function gate()
23
    {
24
        Gate::define('viewHorizon', fn ($user) => $user?->isAdmin());
25
    }
26
}
27