mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-18 19:13:17 +00:00
43 lines
1,004 B
PHP
43 lines
1,004 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Laravel\Horizon\Horizon;
|
|
use Illuminate\Support\Facades\Gate;
|
|
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');
|
|
|
|
if(config('horizon.darkmode') == true) {
|
|
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 $user->is_admin == true;
|
|
});
|
|
}
|
|
|
|
}
|