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', '.*');