request = $request; $this->flowPoolService = $flowPoolService; } /** * RD流量池列表 * * @return void */ public function real() { $list = app(RealFlowPoolRepository::class)->get(); return res($list, 'RD流量池列表', 201); } /** * 列表. * * @return \Illuminate\Http\Response */ public function index() { $conditions = $this->request->all(); $flowPools = $this->flowPoolService->index($conditions); return res($flowPools, '流量池列表', 201); } /** * 创建. * * @return \Illuminate\Http\Response */ public function create() { $attributes = $this->request->all(); $flowPool = $this->flowPoolService->store($attributes); return res($flowPool, '创建成功'); } /** * 编辑. * * @return \Illuminate\Http\Response */ public function update($id) { $attributes = $this->request->all(); $attributes['id'] = $id; $flowPool = $this->flowPoolService->store($attributes); return res($flowPool, '修改成功'); } /** * 删除. * * @return \Illuminate\Http\Response */ public function destroy() { $ids = $this->request->ids(); $this->flowPoolService->destroy($ids); return res(true, '删除成功'); } }