diff --git a/app/Http/Requests/Request.php b/app/Http/Requests/Request.php index 7825ca586e68..f965e6af7ba3 100644 --- a/app/Http/Requests/Request.php +++ b/app/Http/Requests/Request.php @@ -1,7 +1,6 @@ req = $req; - } - /** * Validate the input. * @@ -60,8 +54,9 @@ abstract class Request extends FormRequest { public function response(array $errors) { /* If the user is not validating from a mobile app - pass through parent::response */ - if(!isset($this->req->api_secret)) + if ( ! request()->api_secret) { return parent::response($errors); + } /* If the user is validating from a mobile app - pass through first error string and return error */ foreach($errors as $error) {