# Create an admin generator
To create an admin, simply execute the following command:
php app/console admin:generate-admin
It will ask a few simple questions to be able to configure the new admin correctly. Below are the questions with possible answers, we use the Acme/AdminBundle with an Article model:
- Fully qualified bundle name: Acme/AdminBundle
- Use this field to indicate the target bundle. Make sure the name ends on Bundle and that you use a forward slash for the namespace. If the bundle does not exist, it will be created.
- Target directory: (use default)
- If you have another location to generate/look for the new bundle, give it now.
- Generator: doctrine/doctrine_odm/propel
- Choose the correct model manager for your model.
- Model name: Article
- The complete name of the model you want to manage. Note that you want to give the fully qualified name if the model is not located in the same bundle.
- Prefix of yaml: AdminArticle
- This text will be added as prefix to the generator config file for easy recognition.
If you do not want to use the step-by-step command, you can also directly use the parameters.
--namespace=NAMESPACE The namespace of the admin to create
--dir=DIR The directory where to create the admin
--generator=GENERATOR The generator service (propel, doctrine, doctrine_odm) [default: "doctrine"]
--model-name=MODEL-NAME Base model name for admin module, without namespace. [default: "YourModel"]
--prefix=PREFIX The generator prefix ([prefix]-generator.yml)