return $user->append('is_admin')->toArray(); return $user->setAppends(['is_admin'])->toArray();
protected $appends = ['user']; public function getUserAttribute() { return $this->user(); }