[newPage: Buecherverleih] zipFile solved

This commit is contained in:
p.sterz
2023-08-03 20:09:16 +02:00
parent fc3c210dd1
commit af4c2f04dd
5 changed files with 75 additions and 37 deletions

View File

@@ -3,6 +3,7 @@
use App\Http\Livewire\News\InternArticleView;
use Illuminate\Http\Request;
use Laravel\Socialite\Facades\Socialite;
use Illuminate\Support\Facades\Response;
Route::middleware([])
->get('/bsc', \App\Http\Livewire\Specials\BalticSeaCircle::class)
@@ -384,3 +385,51 @@ Route::middleware([
});
Route::feeds();
Route::get('/download', function () {
// Get the file path from the public folder
$filePath = public_path("buecherverleih.zip");
$filename = "buecherverleih.zip";
// Check if the file exists
if (!file_exists($filePath)) {
abort(404);
}
// Generate a response with the file for download
return Response::download($filePath, $filename);
});
Route::get('/download-flyer', function () {
// Get the file path from the public folder
$filePath = public_path("flyer.zip");
$filename = "flyer.zip";
// Check if the file exists
if (!file_exists($filePath)) {
abort(404);
}
// Generate a response with the file for download
return Response::download($filePath, $filename);
});
Route::get('/download-etiketten', function () {
// Get the file path from the public folder
$filePath = public_path("etiketten.zip");
$filename = "etiketten.zip";
// Check if the file exists
if (!file_exists($filePath)) {
abort(404);
}
// Generate a response with the file for download
return Response::download($filePath, $filename);
});