I'm trying to access the messages from the validator in the controller using the following code.
$valid = Validator::make($input,$rules);
print_r($valid->messages());
However, I'm not getting any output even though the validation is failing.
What do I need to do to get the Laravel-generated validation messages?