Update AppServiceProvider, add UserFilter observer

This commit is contained in:
Daniel Supernault 2019-09-03 19:30:39 -06:00
parent 8a0e1402dd
commit a417d9bbad
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -6,13 +6,15 @@ use App\Observers\{
AvatarObserver,
NotificationObserver,
StatusHashtagObserver,
UserObserver
UserObserver,
UserFilterObserver,
};
use App\{
Avatar,
Notification,
StatusHashtag,
User
User,
UserFilter
};
use Auth, Horizon, URL;
use Illuminate\Support\Facades\Blade;
@ -35,6 +37,7 @@ class AppServiceProvider extends ServiceProvider
Notification::observe(NotificationObserver::class);
StatusHashtag::observe(StatusHashtagObserver::class);
User::observe(UserObserver::class);
UserFilter::observe(UserFilterObserver::class);
Horizon::auth(function ($request) {
return Auth::check() && $request->user()->is_admin;