title: how can i return the notifications mark as read
body: <p>i want to make the notifications mark as read when i checked , itry to put them as read but it not work 
  here is my app.blade.php</p>
  
  <pre><code> &lt;li class="dropdown" id="markasread" onclick="markNaotificationAsAread()"&gt;
  
                              &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="true"&gt;
              &lt;span class="glyphicon glyphicon-globe"&gt;&lt;/span&gt; Notifications &lt;span class="badge "&gt;{{count(Auth()-&gt;user()-&gt;unreadNotifications)}}&lt;/span&gt;
  
                              &lt;/a&gt;
                              &lt;ul class="dropdown-menu" role="menu"&gt;
  
                                      @foreach(Auth()-&gt;user()-&gt;unreadNotifications as $notification)
                                   &lt;li&gt;
                                      @if(isset($notification-&gt;data['ad_object']))
          &lt;a href="#"&gt;{{$notification-&gt;data['user_name']}} posted a new ad  "{{$notification-&gt;data['ad_object']}}"&lt;/a&gt;
                             @endif
  
                              @if(isset($notification-&gt;data['comment_content']))
          &lt;a href="#"&gt;{{$notification-&gt;data['user_name']}} posted a new comment "{{$notification-&gt;data['comment_content']}}"&lt;/a&gt;
                             @endif
                                   &lt;/li&gt;
                                   @endforeach
  
  
  
                              &lt;/ul&gt;
                          &lt;/li&gt;
  
                          &lt;li class="dropdown"&gt;
  </code></pre>
  
  <p>and here is my web.php</p>
  
  <pre><code> Route::get('/markAsRead',function(){
  
  Auth()-&gt;user()-&gt;unreadNotifications-&gt;markAsRead();
  </code></pre>
  
  <p>});</p>
  
  <p>what can i do please  help me</p>