fix response of validations
This commit is contained in:
parent
9ef9137688
commit
b455fe6f06
@ -55,6 +55,10 @@ class Handler extends ExceptionHandler
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($e instanceof ValidationException) {
|
||||
return $e->getResponse()->setStatusCode(200);
|
||||
}
|
||||
|
||||
if (config('app.debug')) {
|
||||
foreach ($this->dontReport as $type) {
|
||||
if ($e instanceof $type) {
|
||||
|
@ -16,7 +16,9 @@ class Controller extends BaseController
|
||||
*/
|
||||
protected function formatValidationErrors(Validator $validator)
|
||||
{
|
||||
//return $validator->errors()->all();
|
||||
dd($validator->errors()->all());
|
||||
return [
|
||||
'errno' => 1,
|
||||
'msg' => $validator->errors()->first()
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user