public function show($id) { $order = $this->repository->find($id); $client = $this->repository_user->find($order->client_id); $deliveryman = $this->repository_user->find($order->user_deliveryman_id); $products = $this->repository_items->with('product')->findWhere(['order_id' => $id]); #dd($deliveryman); return view('admin.orders.show', compact('order', 'products', 'client', 'deliveryman')); }
public function view($id) { $order = $this->repository->find($id); $items = $this->orderItemRepository->with('product')->findWhere(['order_id' => $id]); return view('admin.orders.view', compact('order', 'items')); }