output(); exit; } catch (Exception $ex) {} /* * Fall back on Cms controller */ return App::make('Cms\Classes\Controller')->setStatusCode(404)->run('/404'); } public static function getDownloadUrl($file) { return Backend::url('backend/files/get/' . self::getUniqueCode($file)); } public static function getUniqueCode($file) { if (!$file) { return null; } $hash = md5($file->file_name . '!' . $file->disk_name); return base64_encode($file->id . '!' . $hash); } }