title: Laravel compare between date field and date now
body: <p>I am trying to compare between date field that saved to my database and current date! </p>
  
  <p>The circle is: </p>
  
  <ol>
  <li>admin will add a new career with deadline date</li>
  <li>when someone fill the application he/she will see the available jobs only in drop down list  ( that its deadline date less than the current date ) </li>
  </ol>
  
  <p>so this is the Jobs model </p>
  
  <pre><code>          protected $fillable = ['job_name','job_req', 'expire'];
  </code></pre>
  
  <p>this is jobs migrations</p>
  
  <pre><code>          public function up()
  {
      Schema::create('jobs', function(Blueprint $table)
      {
          $table-&gt;increments('id');
          $table-&gt;string('job_name');
          $table-&gt;string('job_req');
          $table-&gt;date('expire');
          $table-&gt;timestamps();
      });
  }
  
  public function down()
  {
      Schema::drop('jobs');
  }
  </code></pre>
  
  <p>this is the ApplicationController.php</p>
  
  <pre><code>       public function create()
  {   
      $dt = Carbon::now()-&gt;toDateString();
      $jobs = Jobs::get()-&gt;where('$dt', '&lt;', 'expire');
      return view('post.create',compact('jobs'));
  }
  </code></pre>
  
  <p>Now when i open application form it doesn't returns any job title, but when i remove where clause from the controller it works well! </p>