/** * Display the specified resource. * * @param int $id * * @return \Illuminate\Http\Response */ public function show($id) { return $this->orderRepository->with(['coupon', 'items.product.category'])->find($id); }
/** * Display the specified resource. * * @param $orderId * * @return mixed */ public function show($orderId) { $deliverymanId = $this->authorizer->getResourceOwnerId(); return $this->orderRepository->with(['coupon', 'client', 'items.product.category'])->findWhere(['id' => $orderId, 'user_deliveryman_id' => $deliverymanId]); }