浏览代码

On NavBar aswell

1Day 3 年之前
父节点
当前提交
2e17cab295

+ 1 - 1
app/Http/Controllers/NotificationController.php

@@ -31,7 +31,7 @@ class NotificationController extends Controller
         foreach($notifications as $notification){
             $notification->markAsRead();
         }
-        return $this->index();
+        return redirect()->back();
 
     }
 }

+ 3 - 0
resources/views/layouts/main.blade.php

@@ -112,6 +112,9 @@
                         <div class="dropdown-divider"></div>
                         <a href="{{ route('notifications.index') }}"
                             class="dropdown-item dropdown-footer">{{ __('See all Notifications') }}</a>
+                        <div class="dropdown-divider"></div>
+                        <a href="{{ route('notifications.readAll') }}"
+                           class="dropdown-item dropdown-footer">{{ __('Mark all as read') }}</a>
                     </div>
                 </li>
 

+ 1 - 1
resources/views/notifications/index.blade.php

@@ -30,7 +30,7 @@
                     <p>{{__('All notifications')}}</p>
                 </div>
                     <a class="float-right">
-                        <a href="{{route('notifications.readAll')}}"><button class="btn btn-info btn-xs">{{__('mark all as read')}}</button></a>
+                        <a href="{{route('notifications.readAll')}}"><button class="btn btn-info btn-xs">{{__('Mark all as read')}}</button></a>
 
 
                 @foreach($notifications as $notification)