title: Retrieve data from the database using Eloquent between two dates
body: <p>I'm having trouble retrieving data from the database using Eloquent. I am trying to retrieve all data between two dates (<code>created_at</code> field).</p>
  
  <p>I've done this: </p>
  
  <pre><code> public function search(Request $request){
          $start_date  = $request-&gt;get('start_date');
          $end_date = $request-&gt;get('end_date');
  
          $getinfo =  DB::table('media')
              -&gt;join('content_forms', 'media.id', "=", 'content_forms.media_id')
              -&gt;whereBetween('Date_Occured',[$start_date, $end_date])
              -&gt;get();
          dd($getinfo);
      }
  </code></pre>