request = $request; $this->orderService = $orderService; } /** * 列表. * * @return \Illuminate\Http\Response */ public function index() { $conditions = $this->request->all(); $conditions['limit'] = $this->request->get('limit', 10); $orders = $this->orderService->index($conditions); $orders->transform(function($item){ return $item->only([ 'id', 'sn', 'company_name', 'package_name', 'carrier_operator_name', 'pay_channel_name', 'counts', 'shipments', 'total_price', 'order_at', ]); }); return res($orders, '订单列表', 201); } /** * 取卡 * * @return \Illuminate\Http\Response */ public function cards() { $conditions = $this->request->all(); $orders = $this->orderService->cards($conditions); return res($orders, '卡列表', 201); } }