How can I check the age of a user upon registration? I want to set the minimum age to be 13 years old. I ask for the user\'s date of birth and when I validate the other cred
You can use Carbon which comes with laravel
$dt = new Carbon\Carbon(); $before = $dt->subYears(13)->format('Y-m-d'); $rules = [ ... 'dob' => 'required|date|before:' . $before ];