title: Laravel -time with carbon
body: <p>I have a table where i have to validate field. If date will be 30 days to "validto" date it'll be red ( some kind of notification that only 30 days are left). In database my field valid to is "date" type. I tried to add variable using carbon but it's not working:</p>
  
  <p><strong>Controller:</strong></p>
  
  <pre><code>$users = User::all();
          $dt = Carbon::today();
          $ends = $dt-&gt;addDays(30);
          return view ('users.index', ['users'=&gt;$users, 'dt'=&gt;$dt, 'ends'=&gt;$ends]);
  </code></pre>
  
  <p><strong>View:</strong></p>
  
  <pre><code>&lt;tbody&gt;
  
  
   @foreach($users as $user)
              &lt;th&gt; {{$user -&gt;name}}&lt;/th&gt;
              &lt;th&gt;{{$user -&gt;email}}&lt;/th&gt;
              @if($user-&gt;validTo == $ends)
            &lt;th&gt;&lt;p style="color:red"&gt;{{$user -&gt;validTo}}&lt;/p&gt;&lt;/th&gt;
            @else
            &lt;th&gt;{{$user-&gt;validTo}}&lt;/th&gt;
            @endif
            @endforeach
          &lt;/tbody&gt;
  </code></pre>
  
  <p>Any suggestions?</p>