From 5166c7d0c5d076de87b3c17c9c315257305aace7 Mon Sep 17 00:00:00 2001 From: Kilian Hofmann Date: Fri, 13 Aug 2021 13:17:59 +0200 Subject: [PATCH] Error message --- routes.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/routes.php b/routes.php index 651fcff..e3eb6d2 100644 --- a/routes.php +++ b/routes.php @@ -1,10 +1,10 @@ where('path', '.*'); +Route::get('/app/{path?}', function () { + if (file_exists(__DIR__ . '/assets/index.html')) { + $file = file_get_contents(__DIR__ . '/assets/index.html'); + return $file; + } else { + App::abort(404, 'Could not find index.html. Is react compiled?'); + } +})->where('path', '.*');