S
S
symnoob2019-08-08 19:27:26
symfony
symnoob, 2019-08-08 19:27:26

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;
    }

    //...
}

If anyone has an example or advice that would be great!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question