config / admin / customer.yaml
easy_admin:
entities:
Customer:
class: App\Entity\Customer
form:
fields:
- name
- addressRegion # Many-to-one to App/Entity/Region
- addressCity # Many-to-one to App/Entity/City
- addressStreet
- phone
App / Entity / City.php
/**
* @ORM\ManyToOne(targetEntity="Region")
* @ORM\JoinColumn(name="region_id", referencedColumnName="id"
*/
private $region;
public function getRegion() {
return $this->region;
}
public function setRegion(RegionInterface $region) {
$this->region = $region;
}
请向我显示路径,如何根据所选区域填充城市。