forked from mirror/pixelfed
Update AppServiceProvider
This commit is contained in:
parent
73b9a75a64
commit
a5946f590b
1 changed files with 6 additions and 0 deletions
|
@ -5,6 +5,7 @@ namespace App\Providers;
|
|||
use App\Observers\{
|
||||
AvatarObserver,
|
||||
FollowerObserver,
|
||||
HashtagFollowObserver,
|
||||
LikeObserver,
|
||||
NotificationObserver,
|
||||
ModLogObserver,
|
||||
|
@ -17,6 +18,7 @@ use App\Observers\{
|
|||
use App\{
|
||||
Avatar,
|
||||
Follower,
|
||||
HashtagFollow,
|
||||
Like,
|
||||
Notification,
|
||||
ModLog,
|
||||
|
@ -32,6 +34,7 @@ use Illuminate\Support\Facades\Schema;
|
|||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Pagination\Paginator;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
@ -50,6 +53,7 @@ class AppServiceProvider extends ServiceProvider
|
|||
Paginator::useBootstrap();
|
||||
Avatar::observe(AvatarObserver::class);
|
||||
Follower::observe(FollowerObserver::class);
|
||||
HashtagFollow::observe(HashtagFollowObserver::class);
|
||||
Like::observe(LikeObserver::class);
|
||||
Notification::observe(NotificationObserver::class);
|
||||
ModLog::observe(ModLogObserver::class);
|
||||
|
@ -62,6 +66,8 @@ class AppServiceProvider extends ServiceProvider
|
|||
return Auth::check() && $request->user()->is_admin;
|
||||
});
|
||||
Validator::includeUnvalidatedArrayKeys();
|
||||
|
||||
// Model::preventLazyLoading(true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue