public function getBought()
    {
        $items = Item::join('seller')
            ->leftJoin('purchases')
            ->where('purchases.user_id', Auth::user()->userId);

        if (mustard_loaded('auctions')) {
            $items->leftJoin('winningBid')
                ->orWhere('bids.user_id', Auth::user()->userId);
        }

        $table = new InventoryBought($items);

        return view('mustard::inventory.bought', [
            'table' => $table,
            'items' => $table->paginate(),
        ]);
    }
public function getBought()
    {
        $items = Item::join('seller')
            ->leftJoin('purchases')
            ->where('purchases.user_id', Auth::user()->userId);

        if (mustard_loaded('auctions')) {
            $items->leftJoin('winningBid')
                ->orWhere('bids.user_id', Auth::user()->userId);
        }

        $table = new InventoryBought($items);

        return view('mustard::inventory.bought', [
            'table' => $table,
            'items' => $table->paginate(),
        ]);
    }
public function getBought ( ) { $ items = Item :: join ( 'seller' ) -> leftJoin ( 'purchases' ) -> where ( 'purchases.user_id' , Auth :: user ( ) -> userId ) ; if ( mustard_loaded ( 'auctions' ) ) { $ items -> leftJoin ( 'winningBid' ) -> orWhere ( 'bids.user_id' , Auth :: user ( ) -> userId ) ; } $ table = new InventoryBought ( $ items ) ; return view ( 'mustard::inventory.bought' , [ 'table' => $ table , 'items' => $ table -> paginate ( ) , ] ) ; }
Return the inventory bought items view.

@return \Illuminate\View\View
Return the inventory bought items view .