diff --git a/src/Controller/EasyAdmin/PostCrudController.php b/src/Controller/EasyAdmin/PostCrudController.php index 5aa25063f..3667163f6 100644 --- a/src/Controller/EasyAdmin/PostCrudController.php +++ b/src/Controller/EasyAdmin/PostCrudController.php @@ -6,6 +6,7 @@ use EasyCorp\Bundle\EasyAdminBundle\Config\Action; use EasyCorp\Bundle\EasyAdminBundle\Config\Actions; use EasyCorp\Bundle\EasyAdminBundle\Config\Crud; +use EasyCorp\Bundle\EasyAdminBundle\Config\Filters; use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController; use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField; use EasyCorp\Bundle\EasyAdminBundle\Field\CodeEditorField; @@ -33,6 +34,15 @@ public function configureActions(Actions $actions): Actions ->remove(Crud::PAGE_INDEX, Action::DELETE); } + public function configureFilters(Filters $filters): Filters + { + return $filters + ->add('title') + ->add('author') + ->add('publishedAt') + ; + } + public function configureFields(string $pageName): iterable { yield TextField::new('title');