title: Laravel's whereBetween not including date from
body: <p>Note: Code should work for postgres and mysql.</p>
  
  <p>I want to query a table by <code>date_from</code> and <code>date_to</code>. Let's say there is a date range with format: <code>('d-m-Y')</code></p>
  
  <p><strong>Foo:</strong></p>
  
  <pre><code>[
   {'id': 1, "created_at": "2017-05-20 11:18:00"},
   {'id': 2, "created_at": "2017-05-24 11:38:36"}
  ]
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>$format = 'd-m-Y';
  $df = $request-&gt;input('date_from');
  $dt = $request-&gt;input('date_to');
  $date_from = Carbon::createFromFormat($format, $df);
  $date_to = Carbon::createFromFormat($format, $dt);
  
  Foo::whereBetween('created_at', [$date_from, $date_to])-&gt;get()-&gt;toArray();
  </code></pre>
  
  <p>When I query <code>date_from = '20-05-2017'</code> and <code>date_to = '20-05-2017'</code>, I see an empty array. I expect to see <code>20-05-2017</code> Foo's regardless. If I <code>date_from = '19-05-2017'</code> and <code>date_to = '21-05-2017'</code>, I see <code>20-05-2017</code>'s array.</p>
  
  <p>What's wrong with <code>whereBetween</code>?</p>