Answer the question
In order to leave comments, you need to log in
How to make Easy Admin Symfony 4 custom search?
how to make a custom search/filter in Easy Admin - Symfony 4
the problem is that the fields I want to search for: relation
search input should be one, and work like "AND" operator
Entity
class Product
{
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Category", inversedBy="products")
*/
private $category;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Category2", inversedBy="products2")
*/
private $category2;
public function getCategory(): ?Category
{
return $this->category;
}
public function setCategory(?Category $category): self
{
$this->category = $category;
return $this;
}
//...
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question