App\Http\Controllers\Laralum\DownloadsController::downloader PHP Method

downloader() public method

public downloader ( $slug )
    public function downloader($slug)
    {
        $file = Laralum::document('slug', $slug);
        if ($file) {
            if (!$file->password) {
                if ($file->download_timer == 0) {
                    if ($file->direct_download) {
                        return $this->fileDownload($file->name);
                    }
                }
            }
            return view('/downloader/index', ['file' => $file]);
        } else {
            abort(404);
        }
    }