From a5319830709f22df486835a2bd51e7ae790bce29 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Fri, 1 Nov 2024 07:17:39 +0800 Subject: [PATCH] Laravel Vapor - Fix error 404 files --- routes/web.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/routes/web.php b/routes/web.php index e95e7b02..17c344c9 100644 --- a/routes/web.php +++ b/routes/web.php @@ -37,6 +37,7 @@ use App\Classes\Modules\Transactions\Services\DeletesTransaction; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Log; use App\Classes\General\AWSS3Helper; +use Illuminate\Support\Facades\File; /* |-------------------------------------------------------------------------- @@ -1253,3 +1254,14 @@ Route::get('/downloads', function () { return view('pages.downloads.index'); })->name('admin.download'); + +Route::get('/site.webmanifest', function () { + $filePath = resource_path('assets/images/favicon/site.webmanifest'); + + if (!File::exists($filePath)) { + abort(404); + } + + $contents = File::get($filePath); + return response($contents, 200)->header('Content-Type', 'application/manifest+json'); +});