public static function isDocument($file_name)
{
if (Laralum::document('name', $file_name)) {
return true;
} else {
return false;
}
}
public static function downloadFile($file_name) { # Add a new download to the file if it's a document if (Laralum::isDocument($file_name)) { Laralum::addDownload($file_name); } return response()->download(storage_path('app/' . $file_name)); }