user()->is_admin; }); Validator::includeUnvalidatedArrayKeys(); Gate::define('viewPulse', function (User $user) { 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); } /** * Register any application services. * * @return void */ public function register() { // } }