getKey(), $validator->errors()->toJson() ); parent::__construct($message); } /** * Return the validator message bag. */ public function getMessageBag(): MessageBag { return $this->validator->errors(); } /** * Return the status code for this request. */ public function getStatusCode(): int { return 500; } public function getHeaders(): array { return []; } public function getValidator(): Validator { return $this->validator; } public function getModel(): Model { return $this->model; } }