$model->id, 'name' => $model->name, 'host' => $model->host, 'port' => $model->port, 'username' => $model->username, // @phpstan-ignore-next-line no clue why it can't find this. 'node' => $model->node_id, 'created_at' => self::formatTimestamp($model->created_at), 'updated_at' => self::formatTimestamp($model->updated_at), ]; } /** * Include the databases associated with this host. * * @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource */ public function includeDatabases(DatabaseHost $model) { if (!$this->authorize(AdminAcl::RESOURCE_SERVER_DATABASES)) { return $this->null(); } return $this->collection($model->databases, new ServerDatabaseTransformer()); } }