title: Laravel Eloquent find all records where a date is within a range in JSON column
body: <p>I'm trying to use Eloquent to query a table of records in the database and only retrieve those records where at least 1 record in a json column, consisting of an array of objects, is within a given date range.</p>
  <p>The dates column would look as follows:</p>
  <pre><code>[
    {'date': '2021-01-01'},
    {'date': '2021-01-02'},
    {'date': '2021-01-03'},
  ]
  </code></pre>
  <p>If I pass a start date of '2021-01-01' it then needs to fetch all records where dates.*.date is equal to or after this start date.</p>
  <p>The same applies to the an end_date.</p>
  <p>I've different kinds of syntax like:</p>
  <pre><code>$this-&gt;where('dates-&gt;[*]-&gt;date', '&lt;=', date($value));
  $this-&gt;where('dates-&gt;*-&gt;date', '&lt;=', date($value));
  $this-&gt;where('dates.*.date', '&lt;=', date($value));
  </code></pre>
  <p>Nothing seems to work.</p>
  <p>What am I doing wrong?</p>