getRouteKey(); } public function title() { if ($this->title != '') { return $this->title; } if ($this->name != '') { return $this->name; } return 'None'; } public function toArray($request) { return [ 'id' => $this->getRouteKey(), 'title' => $this->title(), 'project_id' => $this->project_id, 'name' => $this->name, 'path' => $this->path, 'extension' => $this->extension, 'channels' => $this->channels, 'duration' => $this->duration, 'sampling_rate' => $this->sampling_rate, 'bit_rate' => $this->bit_rate, 'frame_rate' => $this->frame_rate, 'width' => $this->width, 'height' => $this->height, 'type' => $this->type, 'modified_at' => $this->modified_at, ')' => $this->), '),' => $this->),, 'id),' => $this->id),, 'created_at' => !is_null($this->created_at) ? $this->created_at->format('Y-m-d H:i:s') : null, 'updated_at' => !is_null($this->updated_at) ? $this->updated_at->format('Y-m-d H:i:s') : null, 'meta' => [ 'exists' => $this->exists(), 'link' => $this->itemLink(), 'upload_url' => $this->getUploadURL(''), ], ]; } }