How to query date month and year between `from_date` and `to_date`? 

What I tired:

```
$posts = my_table::whereYear('from_date', '>=', $year)
    ->whereMonth('from_date', '>=', $month)
    ->whereYear('to_date', '<=', $year)
    ->whereMonth('to_date', '<=', $month)
    ->get();

```

Query I want to execute:

```
SELECT * FROM my_table
WHERE (MONTH(from_date)>=2 AND (Year(from_date)>=2019)
  AND (MONTH(to_date)=<4 AND (Year(to_date)=<2019)

```