fix admin route html response
This commit is contained in:
@@ -28,7 +28,7 @@ Route::group('/', function () {
|
|||||||
$pathInfoArr = explode('/', $pathInfo);
|
$pathInfoArr = explode('/', $pathInfo);
|
||||||
$admin = $pathInfoArr[0] ?? '';
|
$admin = $pathInfoArr[0] ?? '';
|
||||||
if ($admin === 'admin') {
|
if ($admin === 'admin') {
|
||||||
return __view(app()->getRootPath() . 'public' . DS . 'admin' . DS . 'index.html');
|
return Response::create(file_get_contents(app()->getRootPath() . 'public' . DS . 'admin' . DS . 'index.html'), 'html');
|
||||||
} else {
|
} else {
|
||||||
return Response::create()->code(404);
|
return Response::create()->code(404);
|
||||||
}
|
}
|
||||||
@@ -55,7 +55,7 @@ Route::group('/', function () {
|
|||||||
$pathInfoArr = explode('/', $pathInfo);
|
$pathInfoArr = explode('/', $pathInfo);
|
||||||
$admin = $pathInfoArr[0] ?? '';
|
$admin = $pathInfoArr[0] ?? '';
|
||||||
if ('kefu' === $admin) {
|
if ('kefu' === $admin) {
|
||||||
return __view(app()->getRootPath() . 'public' . DS . 'admin' . DS . 'index.html');
|
return Response::create(file_get_contents(app()->getRootPath() . 'public' . DS . 'admin' . DS . 'index.html'), 'html');
|
||||||
} else {
|
} else {
|
||||||
return Response::create()->code(404);
|
return Response::create()->code(404);
|
||||||
}
|
}
|
||||||
@@ -91,7 +91,7 @@ Route::group('/', function () {
|
|||||||
$pathInfoArr = explode('/', $pathInfo);
|
$pathInfoArr = explode('/', $pathInfo);
|
||||||
$admin = $pathInfoArr[0] ?? '';
|
$admin = $pathInfoArr[0] ?? '';
|
||||||
if ('supplier' === $admin) {
|
if ('supplier' === $admin) {
|
||||||
return __view(app()->getRootPath() . 'public' . DS . 'admin' . DS . 'index.html');
|
return Response::create(file_get_contents(app()->getRootPath() . 'public' . DS . 'admin' . DS . 'index.html'), 'html');
|
||||||
} else {
|
} else {
|
||||||
return Response::create()->code(404);
|
return Response::create()->code(404);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user