|
|
|
@ -20,6 +20,7 @@ use App\Observers\StatusObserver;
|
|
|
|
|
use App\Observers\UserFilterObserver;
|
|
|
|
|
use App\Observers\UserObserver;
|
|
|
|
|
use App\Profile;
|
|
|
|
|
use App\Services\AccountService;
|
|
|
|
|
use App\Status;
|
|
|
|
|
use App\StatusHashtag;
|
|
|
|
|
use App\User;
|
|
|
|
@ -32,6 +33,7 @@ use Illuminate\Support\Facades\Gate;
|
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
use Illuminate\Support\Facades\Validator;
|
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
use Laravel\Pulse\Facades\Pulse;
|
|
|
|
|
use URL;
|
|
|
|
|
|
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
|
|
@ -69,6 +71,20 @@ class AppServiceProvider extends ServiceProvider
|
|
|
|
|
return $user->is_admin === 1;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Pulse::user(function ($user) {
|
|
|
|
|
$acct = AccountService::get($user->profile_id, true);
|
|
|
|
|
|
|
|
|
|
return $acct ? [
|
|
|
|
|
'name' => $acct['username'],
|
|
|
|
|
'extra' => $user->email,
|
|
|
|
|
'avatar' => $acct['avatar'],
|
|
|
|
|
] : [
|
|
|
|
|
'name' => $user->username,
|
|
|
|
|
'extra' => 'DELETED',
|
|
|
|
|
'avatar' => '/storage/avatars/default.jpg',
|
|
|
|
|
];
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Model::preventLazyLoading(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|