addressRepo = $addressRepository; $this->countryRepo = $countryRepository; $this->provinceRepo = $provinceRepository; } /** * Show the customer's address * * @param int $customerId * @param int $addressId * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function show(int $customerId, int $addressId) { return view('admin.addresses.customers.show', [ 'address' => $this->addressRepo->findAddressById($addressId), 'customerId' => $customerId ]); } /** * Show the edit form * * @param int $customerId * @param int $addressId * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function edit(int $customerId, int $addressId) { $this->countryRepo->findCountryById(env('COUNTRY_ID', 1)); $province = $this->provinceRepo->findProvinceById(1); return view('admin.addresses.customers.edit', [ 'address' => $this->addressRepo->findAddressById($addressId), 'countries' => $this->countryRepo->listCountries(), 'provinces' => $this->countryRepo->findProvinces(), 'cities' => $this->provinceRepo->listCities($province->id), 'customerId' => $customerId ]); } }