title: How to retrieve data of current date in Laravel
body: <p>I want to retrieve data of today from my database in Laravel.</p>
  
  <p>I have already googling and applied several methods but not getting my answer.</p>
  
  <pre><code>PrescriptionTbl::whereDate('created_at', '=', $today)-&gt;get();
  </code></pre>
  
  <p>Where <code>PrescriptionTbl</code> is the model and <code>today</code> is current date like <code>2019-2-19</code>.But got NULL array.</p>
  
  <p>To check the SQL I have used <code>toSQL()</code> instead of <code>get()</code>...and it shows below SQL in the browser</p>
  
  <pre><code> select * from `prescription_tbls` where date(`created_at`) = ?
  </code></pre>
  
  <p>I have also use <code>Carbon</code> but also get a NULL array</p>
  
  <pre><code>PrescriptionTbl::whereDate('created_at', Carbon::today())-&gt;get();
  </code></pre>
  
  <p>How to solve it? Anybody Help Please?</p>