1👍
So this worked for me:
if ($exception instanceof ValidationException && $request->expectsJson()) {
return response()->json(['message' => 'The given data was invalid.', 'errors' => $exception->validator->getMessageBag()], 422);
}
in app\Exceptions\Handler.php, render function. But I can’t still fathom what went wrong initially.
- [Vuejs]-Using Vuex state in computed property to open modal, changes are ignored, modal stays closed
- [Vuejs]-Toggle MANY divs onclick in Vue without pre-declaring the variables
Source:stackexchange.com