1
0
Fork 0
forked from mirror/pixelfed

Update AppServiceProvider

This commit is contained in:
Daniel Supernault 2024-07-30 22:25:48 -06:00
parent 73b9a75a64
commit a5946f590b
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

@ -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);
}
/**