public function downloadReportByFilename(GeneratorListener $listener, $filename)
    {
        if (!$filename) {
            return $listener->downloadFailed();
        }
        $file       = storage_path('temp' . DIRECTORY_SEPARATOR . $filename);
        /* @var $filesystem Filesystem */
        $filesystem = app(Filesystem::class);
        if (!$filesystem->exists($file)) {
            return $listener->downloadFailed();
        }
        return Response::download($file);
    }
public function downloadReportByFilename(GeneratorListener $listener, $filename)
    {
        if (!$filename) {
            return $listener->downloadFailed();
        }
        $file       = storage_path('temp' . DIRECTORY_SEPARATOR . $filename);
        /* @var $filesystem Filesystem */
        $filesystem = app(Filesystem::class);
        if (!$filesystem->exists($file)) {
            return $listener->downloadFailed();
        }
        return Response::download($file);
    }
public function downloadReportByFilename ( GeneratorListener $ listener , $ filename ) { if ( ! $ filename ) { return $ listener -> downloadFailed ( ) ; } $ file = storage_path ( 'temp' . DIRECTORY_SEPARATOR . $ filename ) ; /* @var $filesystem Filesystem */ $ filesystem = app ( Filesystem :: class ) ; if ( ! $ filesystem -> exists ( $ file ) ) { return $ listener -> downloadFailed ( ) ; } return Response :: download ( $ file ) ; }
downloads system report by filename

@param GeneratorListener $listener
@param String $filename
@return Response|RedirectResponse
downloads system report by filename