*/ final class ShowResponse implements ApiResponse { private $route; public static function create(array $data): self { $model = new self(); $model->route = isset($data['route']) ? Route::create($data['route']) : null; return $model; } private function __construct() { } public function getRoute(): ?Route { return $this->route; } }