How to query only by month on date input and ignore the year and day considering indexing or performance on database in laravel
问题 I have this table training_schedules id course_reference start_date(date) end_date(date) year_id(int, fk) on my form, I have dropdownlist for the month, and another one for the year. Now as you can see there is a mismatch on the month from form and database column . How can I filter the start_date or end_date column using only the integer value from the dropdownlist and ignore the day and year part of the db column? I saw some examples but using raw query and using date functions of database