mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
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\{
|
use App\Observers\{
|
||||||
AvatarObserver,
|
AvatarObserver,
|
||||||
FollowerObserver,
|
FollowerObserver,
|
||||||
|
HashtagFollowObserver,
|
||||||
LikeObserver,
|
LikeObserver,
|
||||||
NotificationObserver,
|
NotificationObserver,
|
||||||
ModLogObserver,
|
ModLogObserver,
|
||||||
|
@ -17,6 +18,7 @@ use App\Observers\{
|
||||||
use App\{
|
use App\{
|
||||||
Avatar,
|
Avatar,
|
||||||
Follower,
|
Follower,
|
||||||
|
HashtagFollow,
|
||||||
Like,
|
Like,
|
||||||
Notification,
|
Notification,
|
||||||
ModLog,
|
ModLog,
|
||||||
|
@ -32,6 +34,7 @@ use Illuminate\Support\Facades\Schema;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Illuminate\Pagination\Paginator;
|
use Illuminate\Pagination\Paginator;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
@ -50,6 +53,7 @@ class AppServiceProvider extends ServiceProvider
|
||||||
Paginator::useBootstrap();
|
Paginator::useBootstrap();
|
||||||
Avatar::observe(AvatarObserver::class);
|
Avatar::observe(AvatarObserver::class);
|
||||||
Follower::observe(FollowerObserver::class);
|
Follower::observe(FollowerObserver::class);
|
||||||
|
HashtagFollow::observe(HashtagFollowObserver::class);
|
||||||
Like::observe(LikeObserver::class);
|
Like::observe(LikeObserver::class);
|
||||||
Notification::observe(NotificationObserver::class);
|
Notification::observe(NotificationObserver::class);
|
||||||
ModLog::observe(ModLogObserver::class);
|
ModLog::observe(ModLogObserver::class);
|
||||||
|
@ -62,6 +66,8 @@ class AppServiceProvider extends ServiceProvider
|
||||||
return Auth::check() && $request->user()->is_admin;
|
return Auth::check() && $request->user()->is_admin;
|
||||||
});
|
});
|
||||||
Validator::includeUnvalidatedArrayKeys();
|
Validator::includeUnvalidatedArrayKeys();
|
||||||
|
|
||||||
|
// Model::preventLazyLoading(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue