errors()->toJson() ); $this->validator = $validator; } /** * Return the validator message bag. * * @return \Illuminate\Support\MessageBag */ public function getMessageBag() { return $this->validator->errors(); } /** * Return the status code for this request. * * @return int */ public function getStatusCode() { return 500; } /** * @return array */ public function getHeaders() { return []; } }