From acc0c963414c73c264029283cd143218cef63c35 Mon Sep 17 00:00:00 2001 From: Dwight Watson Date: Sat, 18 Jun 2016 04:45:24 +1000 Subject: [PATCH] Confirm Ajax request is not Pjax (#14024) --- src/Illuminate/Foundation/Http/FormRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Http/FormRequest.php b/src/Illuminate/Foundation/Http/FormRequest.php index fc4b3178aecf..1c76e4a78d46 100644 --- a/src/Illuminate/Foundation/Http/FormRequest.php +++ b/src/Illuminate/Foundation/Http/FormRequest.php @@ -133,7 +133,7 @@ protected function failedAuthorization() */ public function response(array $errors) { - if ($this->ajax() || $this->wantsJson()) { + if (($this->ajax() && ! $this->pjax()) || $this->wantsJson()) { return new JsonResponse($errors, 422); }