app/Models/Notification.php
/**
     * Set notifications as seen
     *
     * @param null $user
     */
Set notifications as seen
@param null $user
Set notifications as seen @param null $user
public static function seen($user = null)
    {
        if (null === $user) {
            $user = auth()->user();
        }
        \DB::table('notifications')->where([
            'user_id' => $user->id,
            'seen'    => 0,
        ])->update(['seen' => 1]);
    }
public static function seen ( $ user = null ) { if ( null === $ user ) { $ user = auth ( ) -> user ( ) ; } \ DB :: table ( 'notifications' ) -> where ( [ 'user_id' => $ user -> id , 'seen' => 0 , ] ) -> update ( [ 'seen' => 1 ] ) ; }
Set notifications as seen
 @param null $user
Set notifications as seen @param null $user