Khandaker Toihidul Islam
Front-end Developer
React Js | Javascript | HTML | CSS | Bootstrap | Wordpress | PHP | Mysql

Roles appear in the 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