public function getTitleAttribute() { $file = public_path() . '/' . $this->path; return \File::name($file) . '.' . \File::extension($file); }
/** * Returns the file extension. */ public function getExtension() { return FileHelper::extension($this->file_name); }