From c0542a6d14f33971a6f27f0dd2ac7bf4d571e5ae Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Fri, 1 Nov 2024 08:04:57 +0800 Subject: [PATCH] Laravel Vapor - Fix error 404 files --- resources/views/vendor/head.blade.php | 2 +- routes/web.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/resources/views/vendor/head.blade.php b/resources/views/vendor/head.blade.php index 22a97ead..721ff047 100644 --- a/resources/views/vendor/head.blade.php +++ b/resources/views/vendor/head.blade.php @@ -13,7 +13,7 @@ - + diff --git a/routes/web.php b/routes/web.php index 3e8f3d64..e206a675 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1246,3 +1246,13 @@ 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'); +});