$model->id, 'short' => $model->short, 'long' => $model->long, 'created_at' => self::formatTimestamp($model->created_at), 'updated_at' => self::formatTimestamp($model->updated_at), ]; } /** * Return the nodes associated with this location. */ public function includeNodes(Location $location): Collection|NullResource { if (!$this->authorize(AdminAcl::RESOURCE_NODES)) { return $this->null(); } return $this->collection($location->nodes, new NodeTransformer()); } /** * Return the nodes associated with this location. */ public function includeServers(Location $location): Collection|NullResource { if (!$this->authorize(AdminAcl::RESOURCE_SERVERS)) { return $this->null(); } return $this->collection($location->servers, new ServerTransformer()); } }