/** * Get the current user logged Orders * * @return \Illuminate\Http\Response */ public function getUserOrders() { $cartcount = $this->carrello->getCartItemsNumber($this->auth->user()->id); $ordini = $this->ordine->where('utente', '=', $this->auth->user()->id)->with('stati', 'tracking', 'pagamenti.scontiTipoPagamento')->orderBy('data_creazione', 'desc')->paginate(20); return view('ordini.user', compact('ordini', 'cartcount')); }