123456789101112131415161718192021 |
- <?php
- namespace App\Http\ViewComposers;
- use Auth;
- use Illuminate\Contracts\View\View;
- use Illuminate\Support\Facades\Notification;
- class AdminNotificationComposer{
- public function compose(View $view){
- $user = Auth::guard('admin')->user();
- $notifications = $user->notifications->take(15);
- $unreadnotifications = $user->unreadnotifications;
- $view->with('notifications',$notifications);
- $view->with('unreadnotifications',$unreadnotifications);
- }
- }
- ?>
|