'ID', 'topic_id' => 'Topic ID', 'uploaded_at' => 'Uploaded At', 'alt' => 'Alt', ]; } public function getTopic(){ return $this->hasOne(NewsTopic::class,["id"=>"topic_id"]); } public function getUrl(){ return "/topic-images/{$this->topic_id}/{$this->id}.{$this->ext}"; } }