cyberace
3 months ago
640
10
Laravel

How can I get the results of the upcoming month's birthdays in Laravel

Posted 3 months ago by cyberace

I have this code but I can't query only birthday of today. What should I do if I need this query type?

    public function birth(Request $request)
{
  
$today = Carbon::now()->format('Y-m-d');


  $birthday = DB::table('customers')
                     ->select('id_user','first_name','last_name','birth_date','open_user_date')
                     ->where('birth_date',$today)
                     ->get();



      return view('reports/birth',compact('birthday','date','today','hbddate'));
  }

Please sign in or create an account to participate in this conversation.