Laravel how to compare age in blade file using date of birth?

Viewed 6

I am fetching date of birth from database and getting the age using carbon in the blade file. But I need to compare if the age is bigger than 18 or not using if condition. But the age seems to be a string rather than integer to be compared with number.

0 Answers
Related