php - Add custom action in easy admin

one text

Solution:

I found the solution in the doc , I don't know how i missed it

public function configureActions(Actions $actions): Actions {

    $accept_Deal = Action::new('accept','accept')
        ->linkToCrudAction('acceptAction')
        ->displayIf(static function ($entity) {
        return $entity->getStatus() == 0 ;
    });

    return $actions
        ->add(Crud::PAGE_INDEX, $accept_Deal)
        ->disable( Action::NEW, Action::EDIT)
        ->add(Crud::PAGE_INDEX, Action::DETAIL)
        ->reorder(Crud::PAGE_INDEX, [Action::DETAIL, Action::DELETE]);
}

Source