$model->id, 'external_id' => $model->external_id, 'uuid' => $model->uuid, 'username' => $model->username, 'email' => $model->email, 'language' => $model->language, 'root_admin' => (bool) $model->root_admin, '2fa' => (bool) $model->use_totp, 'avatar_url' => $model->avatarURL(), 'admin_role_id' => $model->admin_role_id, 'role_name' => $model->adminRoleName(), 'created_at' => self::formatTimestamp($model->created_at), 'updated_at' => self::formatTimestamp($model->updated_at), ]; } /** * Return the servers associated with this user. */ public function includeServers(User $user): Collection|NullResource { if (!$this->authorize(AdminAcl::RESOURCE_SERVERS)) { return $this->null(); } return $this->collection($user->servers, new ServerTransformer()); } }