From 99c35380a43ff474e91773eb8c8178d1874687f4 Mon Sep 17 00:00:00 2001 From: Sobhan <44964722+sobhan-m94@users.noreply.github.com> Date: Fri, 14 Apr 2023 14:53:27 +0330 Subject: [PATCH 1/2] add headers --- src/Illuminate/Foundation/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index 799a446de548..1dbe6af4efec 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -1218,7 +1218,7 @@ public function isDownForMaintenance() public function abort($code, $message = '', array $headers = []) { if ($code == 404) { - throw new NotFoundHttpException($message); + throw new NotFoundHttpException($message, headers: $headers); } throw new HttpException($code, $message, null, $headers); From 76a995005e73a691346e0d45f38685cc3e4865e2 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 14 Apr 2023 09:01:16 -0500 Subject: [PATCH 2/2] Update Application.php --- src/Illuminate/Foundation/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index 1dbe6af4efec..5f696d944553 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -1218,7 +1218,7 @@ public function isDownForMaintenance() public function abort($code, $message = '', array $headers = []) { if ($code == 404) { - throw new NotFoundHttpException($message, headers: $headers); + throw new NotFoundHttpException($message, null, 0, $headers); } throw new HttpException($code, $message, null, $headers);