public function getSold()
    {
        $items = Auth::user()->items()
            ->leftJoin('purchases')
            ->where(function ($query) {
                $query->typeFixed()->whereNotNull('purchases.purchase_id');
            });

        // Allows sorting by buyer username
        $items->getBaseQuery()
            ->join('users', 'users.user_id', '=', 'purchases.user_id');

        if (mustard_loaded('auctions')) {
            $items->leftJoin('winningBid')
                ->orWhere(function ($query) {
                    $query->typeAuction()->whereNotNull('bids.bid_id');
                });
        }

        $table = new InventorySold($items);

        return view('mustard::inventory.sold', [
            'table' => $table,
            'items' => $table->paginate(),
        ]);
    }