I want to show the value of first_name and birth_date of customers who were birthday today. What kind of queries should I do?
$birthday = DB::table('customers')
->select(DB::raw('customers.first_name','customers.birth_date'))
->whereRaw('DAYOFYEAR(curdate()) <= DAYOFYEAR(birth_date) AND DAYOFYEAR(curdate()) + 0 >= dayofyear(birth_date)')
->orderByRaw('DAYOFYEAR(birth_date)')
->get();