title: How to compare carbon date in laravel?
body: <p>I try to check if today is the 3 days after the registration day or not, so i compare today date with the registration date plus 3 days. But i think my code is not working, this is my code:</p>
  
  <pre><code>$get_tanggal_permohonan = DB::table('data_pemohon')-&gt;select('tanggal_permohonan')-&gt;where('noper', $noper)-&gt;first();
  $tanggal_permohonan     = $get_tanggal_permohonan-&gt;tanggal_permohonan;
  $Dday       = \Carbon\Carbon::parse($tanggal_permohonan);
  $today      = \Carbon\Carbon::now()-&gt;toDateString();
  $today      = \Carbon\Carbon::parse($date);
  
  if($today &lt; $Dday-&gt;subDays(3)){
      echo "not the time to come";
  }else{
      echo "time to come"
  }
  </code></pre>
  
  <p>I have no idea to solve this error, help me please. Thank you.</p>