title: How to check date and time to today in laravel
body: <p>I have doing a project. In my project I want to show a start button when the time and date is current date and time. Say Today is 9 th October. If a user gives serial to 10 to 12 am in 9th October, then the start button will show only 10 to 12 am of 9th october. how can I achieve this. 
  My view is</p>
  
  <pre><code>&lt;a class="btn btn-info" style="margin-right: 0" href="{{ URL::to('booking/reject/'.$booking-&gt;id) }}"&gt;Reject&lt;/a&gt;
  @elseif ( !empty($booking-&gt;is_accepted) &amp;&amp; $booking-&gt;is_accepted == 1)
   &lt;a class="btn btn-info" style="margin-right: 0"&gt;Accepted&lt;/a&gt;
  
  &lt;a class="btn btn-info" style="margin-right: 0" href="http://devteam.website/esp+hadfkku+hhj2hjh2+q+web+video+calling/index.php?r=videochat/login"&gt;Start&lt;/a&gt;
  @elseif ( !empty($booking-&gt;is_accepted) &amp;&amp; $booking-&gt;is_accepted == 2)
     &lt;a class="btn btn-info" style="margin-right: 0"&gt;Rejected&lt;/a&gt;
  @endif
  </code></pre>
  
  <p>My Controler is</p>
  
  <pre><code>public function profile($username) {
          $username_exists = User::where('username', $username)-&gt;first();
          if (!empty($username_exists)) {
              if (Auth::check()) {
                  $username_exists-&gt;no_of_viewer = $username_exists-&gt;no_of_viewer + 1 ;
                  $username_exists-&gt;save() ;
                  if (UserRole::where('user_id', Auth::user()-&gt;id)-&gt;first()-&gt;role_id == 2) {
                      $bookings = Booking::where('provider_id', Auth::user()-&gt;id)-&gt;orderBy('id', 'desc')-&gt;get();
                  } elseif (UserRole::where('user_id', Auth::user()-&gt;id)-&gt;first()-&gt;role_id == 3) {
                      $bookings = Booking::where('provider_id', Auth::user()-&gt;id)-&gt;orderBy('id', 'desc')-&gt;get();
                  } else {
                      $bookings = '';
                  }
  
                  $payments = Payment::where('user_id', Auth::user()-&gt;id)-&gt;orWhere('provider_id', Auth::user()-&gt;id)-&gt;get();
              }
              $data = [
                  'user' =&gt; $username_exists,
                  'user_detail' =&gt; UserDetail::where('user_id', $username_exists-&gt;id)-&gt;first(),
                  'user_share' =&gt; UserShare::where('user_id', $username_exists-&gt;id)-&gt;first(),
                  'user_work_experiences' =&gt; UserWorkExperience::where('user_id', $username_exists-&gt;id)-&gt;where('is_deleted', 0)-&gt;get(),
                  'user_academic_experiences' =&gt; UserAcademicExperience::where('user_id', $username_exists-&gt;id)-&gt;where('is_deleted', 0)-&gt;get(),
                  'user_meetings' =&gt; UserMeeting::where('user_id', $username_exists-&gt;id)-&gt;first(),
                  'user_time' =&gt; UserTime::where('user_id', $username_exists-&gt;id)-&gt;first(),
                  'bookings' =&gt; (!empty($bookings)) ? $bookings : '',
                  'reviews' =&gt; Review::where('provider_id', $username_exists-&gt;id)-&gt;get(),
                  'rating' =&gt; Review::where('provider_id', $username_exists-&gt;id)-&gt;avg('rating'),
                  'payments' =&gt; !empty($payments)?$payments:''
              ];
              return view('frontends.profile', $data);
          } else {
              return view('errors.503');
          }
      }
  </code></pre>
  
  <p>Please help</p>