From 32087d9c7723d1d3cb5458114207bd784920627e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F?= Date: Tue, 18 Sep 2018 12:26:04 +0300 Subject: [PATCH] Update web.php This solves the problem with Route::fallback(function() { return response()->json(['message' => 'Not Found!'], 404); }); If no route is found, then there is the possibility to return an 404 error. https://stackoverflow.com/q/52382680/5286034 --- routes/web.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index 0ef8e24..7444e98 100644 --- a/routes/web.php +++ b/routes/web.php @@ -11,4 +11,4 @@ | */ -Route::get('/{any}', 'SpaController@index')->where('any', '.*'); +Route::get('/{any}', 'SpaController@index')->where('any', '^(?!api).*$');