I have following code in my Request class that returns custom messages.
public function formatErrors(\Illuminate\Contracts\Validation\Validator $validator) {
if($validator->fails()) {
$validator->errors()->add('Message', "Validation failed");
}
return parent::formatErrors($validator);
}
It was returning the error messages in Laravel 5.4 but seems like this function is no more working in Laravel 5.5
Did anybody face this issue in Laravel 5.5?