$this->when(! is_null($request->user()), $this->id), 'name' => $this->name, 'email' => $this->when(! is_null($request->user()), $this->email), 'is_admin' => $this->when(! is_null($request->user()), $this->is_admin), ]; } }