use CarbonCarbon; // Include Class in COntroller
$request->date_of_birth = "2000-10-25";
$age = Carbon::parse($request->date_of_birth)->diff(Carbon::now())->y;
dd($age. " Years"); // To check result
$dateOfBirth = '1994-07-02';
$years = Carbon::parse($dateOfBirth)->age;
dd($years);
$birth_date = '1994-07-02';
$age = CarbonCarbon::now()->diffInYears($birth_date);
dd($age.' Years');