title: Check if date is before a certain date PHP laravel
body: <p>I am trying to check if a date is before a certain date. If it is I want to output Valid else output Expired. This is the code I've currently got but all of the entries are being output as Valid which should not be happening.</p>
  
  <p>First I work out the date of this coming Friday which in this case is 2014-10-03, but I want it to be midnight so 2014-10-04 00:00:00. </p>
  
  <pre><code>&lt;?php 
      $lastWed = date('Y-m-d', strtotime('last Wednesday', strtotime('tomorrow')));
      $lastWed = date('Y-m-d H:i:s', strtotime($lastWed.' 11:00:00')); //2014-10-01 11:00:00
      $fri = date('Y-m-d H:i:s', strtotime('+61 hours', strtotime($lastWed)));  //2014-10-04 00:00:00
     //Valid 2014-10-01    //Expired 2014-09-25
  ?&gt;
  </code></pre>
  
  <p>Then I use the <code>$fri</code> variable to see if the entry is valid or not. However it is not working. Any thoughts? </p>
  
  <pre><code>@if(date('Y-m-d H:i:s', strtotime($winner-&gt;created_at)) &lt;= $fri)
      Valid until &lt;?= $fri ?&gt;
  @else
      Expired
  @endif
  </code></pre>