Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

return response at failedValidation() in request laravel

protected function failedValidation(Validator $validator) { 
        throw new HttpResponseException(response()->json($validator->errors()->all(), 422)); 
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #return #response #request #laravel
ADD COMMENT
Topic
Name
3+2 =