-2

So, I have a field on my database that keeps the date, just like the created_at field, year-month-day format.

I need to create a method to do a query to return all results where month = current month we are living. How can I check this on laravel?

Thanks in advance!

1 Answers1

1

Model::whereMonth('field', Carbon::now()->month)->get();

Kevin
  • 1,152
  • 5
  • 13