public function download(Request $request)
    {
        $disk = $request->get('disk');
        $file = $request->get('file');

        $storage = Storage::disk($disk);

        $fullPath = $storage->getDriver()->getAdapter()->applyPathPrefix($file);

        if (File::isFile($fullPath)) {
            return response()->download($fullPath);
        }

        return response('', 404);
    }
public function download(Request $request)
    {
        $disk = $request->get('disk');
        $file = $request->get('file');

        $storage = Storage::disk($disk);

        $fullPath = $storage->getDriver()->getAdapter()->applyPathPrefix($file);

        if (File::isFile($fullPath)) {
            return response()->download($fullPath);
        }

        return response('', 404);
    }
public function download ( Request $ request ) { $ disk = $ request -> get ( 'disk' ) ; $ file = $ request -> get ( 'file' ) ; $ storage = Storage :: disk ( $ disk ) ; $ fullPath = $ storage -> getDriver ( ) -> getAdapter ( ) -> applyPathPrefix ( $ file ) ; if ( File :: isFile ( $ fullPath ) ) { return response ( ) -> download ( $ fullPath ) ; } return response ( '' , 404 ) ; }
Download a backup zip file.

@param Request $request

@return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\BinaryFileResponse|\Symfony\Component\HttpFoundation\Response
Download a backup zip file .