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