Khandaker Toihidul Islam
Software Engineer
Backend : PHP | Mysql | Symfony | CakePhp | Wordpress | Drupal
Frontend : Node js | Vue js | React Js | Javascript | HTML | CSS | Bootstrap
Tools , Server : Nginx | Apache | Git | Jenkins | Jira | Asana | Silenium | Spira

Roles appear in user form

Need to add properties in config/packages/easy_admin.yaml

easy_admin:
  entities:
      User:
          class: App\Entity\User
          form:
              fields:
                  - { property: 'email' }
                  - { property: 'password' }
                  -   property: 'roles'
                      type: 'choice'
                      type_options:
                          mapped: true
                          expanded: true
                          multiple: true
                          choices: { 'User': 'ROLE_USER', 'Administrateur': 'ROLE_ADMIN' }
                  - { property: 'active' }

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *