How can I get the value, that was found with exists
rule of a Validator
?
$validator = Validator::make($request->all(), [
'invite' => 'required|max:30|exists:invites,code',
]);
I don't want to make a second request to a database, it is already done by the validator.
Invite::where('code', $value)
via shukshin.ivan