Compare commits

..

No commits in common. "429f77cfe13bb3fa42539a41f887c948385dd531" and "32abf4ad92e7c43b40bc7972d94bf5266563175c" have entirely different histories.

2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ use Illuminate\Http\Request;
class DownloadController extends Controller class DownloadController extends Controller
{ {
public function download($file_name) { public function download($file_name) {
$file_path = public_path('/'.'downloads/'.$file_name); $file_path = public_path('/'.$file_name);
return response()->download($file_path); return response()->download($file_path);
} }
} }

View File

@ -18,4 +18,4 @@ Route::get('/', function () {
}); });
Route::get('/download_api', 'App\Http\Controllers\YoutubeDownloadController@index'); Route::get('/download_api', 'App\Http\Controllers\YoutubeDownloadController@index');
Route::get('/download/{file}', 'App\Http\Controllers\DownloadController@download'); Route::get('/download/{file}', 'App\Http\Controllers\DownloadController@index');