title: Laravel: Compare two dates against today with Eloquent
body: <p>So I have events table which has start date and end date.</p>
  
  <p>What I want to do is a comparison between today and start date + end date so if today is between start and end, return that collection which will be displayed on page, if it isn't ignore that event.</p>
  
  <p>Problem is that when I retrieve an event I cannot access it as it is return that it doesn't exist in the collection, but it does after view is returned.</p>
  
  <p>Here's my controller:</p>
  
  <pre><code>public function show($id)
  {
      $today = date("Y-m-d");
      $today_dt = new DateTime($today);
      $event = Event::with('businesses')
          -&gt;get();
      $test = $event-&gt;startdate;
      $test2 = $event-&gt;enddate;
      //something like if $today is not less that start date and not higher than end date, return that collection?
      dd($test);
      return view('events.showEvent', compact('event'));
  }
  </code></pre>