<?php

namespace App\Http\ViewComposers;
use Auth;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Facades\Notification;

class ApplicationNotificationComposer{
    public function compose(View $view){

		$user = Auth::user();

        $notifications = $user->notifications->take(15);
        $unreadnotifications = $user->unreadnotifications;

        $view->with('notifications',$notifications);
        $view->with('unreadnotifications',$unreadnotifications);
    }
}

?>