morphTo(); } public function project() { return $this->morphTo('fileable', Project::class); } public function getSize() { return $this->fileExists() ? \Storage::size('public/files/'.$this->filename) : 0; } public function fileExists() { return \Storage::exists('public/files/'.$this->filename); } }