Return the inventory sold items view.

@return \Illuminate\View\View
344730
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(),
        ]);
    }
628552
public function getTotalItemCount()
    {
        if ($this->rowCount !== null) {
            return $this->rowCount;
        }

        $param = null;

        if (is_array($this->select)) {
            $select = $this->select[0];
            $param = $this->select[1];
            $adt = $this->sql->getAdapter();

            $statement = $adt->query(sprintf("SELECT COUNT(1) AS c FROM (%s) AS original_select", $select), $adt::QUERY_MODE_PREPARE);
        } else {
            $select = clone $this->select;
            $select->reset(Select::LIMIT);
            $select->reset(Select::OFFSET);
            $select->reset(Select::ORDER);

            $countSelect = new Select();
            $countSelect->columns(array('c' => new Expression('COUNT(1)')));
            $countSelect->from(array('original_select' => $select));

            $statement = $this->sql->prepareStatementForSqlObject($countSelect);
        }

        $result = $statement->execute($param);
        $row = $result->current();

        $this->rowCount = $row['c'];

        return $this->rowCount;
    }
805529
public function index()
    {
        $orderStateGrid = new OrderStatusDataGrid($this->repository->query());

        return view('avored-framework::product.order-status.index')->with('dataGrid', $orderStateGrid->dataGrid);
    }
653724
public function getOrderedProducts(): Collection
    {
        return $this->products->matching(Criteria::create()->orderBy(['order' => Criteria::ASC]));
    }
1373928
public function index()
    {
        $productsBuilder = $this
            ->repository
            ->query()
            ->where('type', '!=', 'VARIABLE_PRODUCT')
            ->orderBy('id', 'desc');

        $productGrid = new ProductDataGrid($productsBuilder);

        return view('avored-framework::product.index')
            ->with('dataGrid', $productGrid->dataGrid);
    }
389479
public function get_visible_items()
	{
		if ($this->_items === NULL) {
			return array();
		}

		$visible_items = [];

		foreach ($this->_items as $key => $item)
		{
			if (! $item->is_visible())
			{
				continue;
			}
			$visible_items[$key] = $item;
		}

		return $visible_items;
	}
4893
public function getEnded()
    {
        $items = Auth::user()->items()->where('end_date', '<', time());

        $table = new InventoryEnded($items);

        return view('mustard::inventory.ended', [
            'table' => $table,
            'items' => $table->paginate(),
        ]);
    }
1342173
public function index()
    {
        $propertyGrid = new Property(Model::query()->orderBy('id', 'desc'));

        return view('avored-ecommerce::property.index')->with('dataGrid', $propertyGrid->dataGrid);
    }
944647
public function indexAction()
    {
        $q  = $this->get('doctrine')
            ->getManager()
            ->createQuery('
                SELECT    o
                FROM      HarvestCloudCoreBundle:Order o
                LEFT JOIN o.buyer b
                LEFT JOIN o.seller s
                LEFT JOIN o.hub h
                WHERE     :profile = o.buyer
                OR        :profile = o.seller
                OR        :profile = o.hub
                ORDER BY  o.id DESC
            ')
            ->setParameter('profile', $this->getCurrentProfile())
        ;

        $orders = $q->getResult();

        // For dev and demo purposes, just get all orders:
        $orders = $this->get('doctrine')
            ->getRepository('HarvestCloudCoreBundle:Order')
            ->findAll()
        ;

        return $this->render('HarvestCloudCoreBundle:Order/Default:index.html.twig', array(
            'profile' => $this->getCurrentProfile(),
            'orders'  => $orders,
            'order'   => $orders[0],
        ));
    }
342243
public function index()
    {
        $totalRegisteredUser = app(UserInterface::class)->all();
        $totalOrder = $this->repository->all()->count();

        return view('avored-framework::home')
            ->with('totalRegisteredUser', $totalRegisteredUser)
            ->with('totalOrder', $totalOrder);
    }
568524
public function index()
    {
        $productTypes = $this->productManager->all();
        $products = $this->product->all();

        return view('product::admin.products.index', compact('products', 'productTypes'));
    }
1048904
public function index()
  {
    if ( \Auth::user()->roles[0]->can('menu-read' ) ) {
      $items = $this->menus->with('roles')
      ->where('parent_id', '=', '0')
      ->orderBy('sort_order', 'ASC')->get();
      return \View::make('acl::admin.menus.index', [
        'items'   =>  $items,
        'title'   => 'list',
      ]);
    }
    return \Redirect::route('admin.menus.index')->withErrors(trans('acl::dashboard.unauthorized_access'));
  }
1337110
public function current()
    {
        if (($this->endItemIdx !== null) && isset($this->lastItems[$this->endItemIdx])) {
            return $this->lastItems[$this->endItemIdx][1];
        } else {
            if (isset($this->firstItems[$this->firstItemIdx])) {
                return $this->firstItems[$this->firstItemIdx][1];
            }
        }
        return $this->extractValue($this->items->current(), $this->titleField);
    }
275759
public function index()
    {
        $categoryGrid = new CategoryDataGrid($this->repository->query());

        return view('avored-ecommerce::category.index')->with('dataGrid', $categoryGrid->dataGrid);
    }
680641
protected function getVisibleItems()
    {
        if (count($this->data) <= $this->visibleCount) {
            return $this->data;
        }
        $visible = [];
        $iterator = (new ArrayObject($this->data))->getIterator();
        while (count($visible) < $this->visibleCount && $iterator->valid()) {
            $visible[] = $iterator->current();
            $iterator->next();
        }

        return $visible;
    }
1012836
protected function getItemBagData()
    {
        $items = array();
        $itemBag = $this->getItems();
        if (! empty($itemBag)) {
            foreach ($itemBag->all() as $item) {
                $items[] = array(
                    'name' => $item->getName(),
                    'description' => $item->getDescription(),
                    'quantity' => $item->getQuantity(),
                    'unit_price' => $item->getPrice(),
                );
            }
        }

        return $items;
    }
1190055
public function index()
    {
        $orderReturnGrid = new OrderReturnRequestDataGrid($this->repository->all());

        return view('avored-framework::order.return-request.index')
                    ->withDataGrid($orderReturnGrid->dataGrid);
    }