src/Notification/NotificationRepository.php
public function markAllAsRead(User $user)
    {
        Notification::where('user_id', $user->id)->update(['read_at' => Carbon::now()]);
    }
public function markAllAsRead(User $user)
    {
        Notification::where('user_id', $user->id)->update(['read_at' => Carbon::now()]);
    }
public function markAllAsRead ( User $ user ) { Notification :: where ( 'user_id' , $ user -> id ) -> update ( [ 'read_at' => Carbon :: now ( ) ] ) ; }
Mark all of a user's notifications as read.

@param User $user

@return void
Mark all of a user s notifications as read .