Error pages views redirected to Admin error pages #1303 - fixed

This commit is contained in:
Amritanshu 2019-10-19 15:29:45 +05:30
parent c688764a83
commit 9fc6837386
1 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ class Handler extends ExceptionHandler
*/
public function render($request, Exception $exception)
{
$path = 'admin';
$path = $this->isAdminUri() ? 'admin' : 'shop';
if ($exception instanceof HttpException) {
$statusCode = in_array($exception->getStatusCode(), [401, 403, 404, 503]) ? $exception->getStatusCode() : 500;
@ -61,7 +61,7 @@ class Handler extends ExceptionHandler
private function isAdminUri()
{
return strpos($_SERVER['REQUEST_URI'], 'admin') !== false ? true : false;
return strpos(\Illuminate\Support\Facades\Request::path(), 'admin') !== false ? true : false;
}
private function response($path, $statusCode)