public function markNotificationAsRead($notification_id)
    {
        $notification = $this->notifications()
            ->where('id', $notification_id)
            ->whereNull('read_at');

        if ($notification->exists()) {
            $notification->first()->markAsRead();
        }
    }
public function markNotificationAsRead($notification_id)
    {
        $notification = $this->notifications()
            ->where('id', $notification_id)
            ->whereNull('read_at');

        if ($notification->exists()) {
            $notification->first()->markAsRead();
        }
    }
public function markNotificationAsRead ( $ notification_id ) { $ notification = $ this -> notifications ( ) -> where ( 'id' , $ notification_id ) -> whereNull ( 'read_at' ) ; if ( $ notification -> exists ( ) ) { $ notification -> first ( ) -> markAsRead ( ) ; } }
Marks the given notification as read.

@param  int $notification_id

@return void
Marks the given notification as read .