request = $request; $this->companyAddressService = $companyAddressService; } /** * 列表. * * @return \Illuminate\Http\Response */ public function index() { $conditions = []; $companyAddress = $this->companyAddressService->getCompanyAddress($conditions['company_id']); return res($companyAddress, '企业地址列表', 201); } /** * 创建. * * @return \Illuminate\Http\Response */ public function create() { $attributes = $this->request->all(); $account = $this->companyAddressService->store($attributes); return res($account, '创建成功'); } /** * 编辑. * * @return \Illuminate\Http\Response */ public function update($id) { $attributes = $this->request->all(); $attributes['id'] = $id; $account = $this->companyAddressService->store($attributes); return res($account, '修改成功'); } /** * 删除. * * @return \Illuminate\Http\Response */ public function destroy() { $ids = $this->request->ids(); $this->companyAddressService->destroy($ids); return res(true, '删除成功'); } }