Correctly json_encode validation errors.
This commit is contained in:
parent
05d2a6d370
commit
5bbded2c03
7 changed files with 16 additions and 16 deletions
|
@ -48,7 +48,7 @@ class ServiceRepository
|
|||
]);
|
||||
|
||||
if ($validator->fails()) {
|
||||
throw new DisplayValidationException($validator->errors());
|
||||
throw new DisplayValidationException(json_encode($validator->errors()));
|
||||
}
|
||||
|
||||
return DB::transaction(function () use ($data) {
|
||||
|
@ -94,7 +94,7 @@ class ServiceRepository
|
|||
]);
|
||||
|
||||
if ($validator->fails()) {
|
||||
throw new DisplayValidationException($validator->errors());
|
||||
throw new DisplayValidationException(json_encode($validator->errors()));
|
||||
}
|
||||
|
||||
return DB::transaction(function () use ($data, $service) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue