[~] ➔ mkdir -p GITHUBAPI
[~] ➔ cd GITHUBAPI/
[~/GITHUBAPI] ➔
[~/GITHUBAPI] ➔ symfony new gitgame1
...
Downloading Symfony...
...
Preparing project...
...
[~/GITHUBAPI] ➔
[~/GITHUBAPI] ➔ cd gitgame1/
[~/GITHUBAPI/gitgame1] ➔ php bin/console server:start
[OK] Server listening on http://127.0.0.1:8000
[~/GITHUBAPI/gitgame1] ➔
[~/GITHUBAPI/gitgame1] ➔ curl -s http://getcomposer.org/installer | php
All settings correct for using Composer
Downloading...
Composer (version 1.4.2) successfully installed to: /home/util01/GITHUBAPI/gitgame1/composer.phar
Use it: php composer.phar
[~/GITHUBAPI/gitgame1] ➔
[~/GITHUBAPI/gitgame1] ➔ php composer.phar require petkopara/crud-generator-bundle
Using version ^3.0 for petkopara/crud-generator-bundle
...
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget
[~/GITHUBAPI/gitgame1] ➔
Ouvrir :
app/AppKernel.php
Chercher :
new AppBundle\AppBundle(),
Ajouter après :
new Lexik\Bundle\FormFilterBundle\LexikFormFilterBundle(),
new Petkopara\MultiSearchBundle\PetkoparaMultiSearchBundle(),
new Petkopara\CrudGeneratorBundle\PetkoparaCrudGeneratorBundle(),
Ouvrir :
app/config/config.yml
Chercher :
twig:
debug: '%kernel.debug%'
strict_variables: '%kernel.debug%'
Ajouter après :
form_themes:
- 'bootstrap_3_layout.html.twig'
Ouvrir :
app/config/parameters.yml
Chercher :
database_name: symfony
database_user: root
database_password: null
Remplacer par :
database_name: gitgame
database_user: root
database_password: mot2passe
[~/GITHUBAPI/gitgame1] ➔ php bin/console generate:bundle --namespace=GitteamBundle
...
What format do you want to use for your generated configuration?
Configuration format (annotation, yml, xml, php) [annotation]: yml
...
Everything is OK! Now get to work :).
[~/GITHUBAPI/gitgame1] ➔
[~/GITHUBAPI/gitgame1] ➔ php bin/console assets:install --symlink
...
[OK] All assets were successfully installed.
[~/GITHUBAPI/gitgame1] ➔
Avec PhpMyAdmin : http://localhost/phpmyadmin Création de la base de données : gitgame
[~/GITHUBAPI/gitgame1] ➔ php bin/console doctrine:generate:entity
...
First, you need to give the entity name you want to generate.
You must use the shortcut notation like AcmeBlogBundle:Post.
The Entity shortcut name: GitteamBundle:Team
...
New field name (press <return> to stop adding fields): Name
Field length [255]: 200
...
New field name (press <return> to stop adding fields): Description
Field length [255]: 200
...
Everything is OK! Now get to work :).
[~/GITHUBAPI/gitgame1] ➔
[~/GITHUBAPI/gitgame1] ➔ php bin/console doctrine:schema:update --force
Updating database schema...
Database schema updated successfully! "1" query was executed
[~/GITHUBAPI/gitgame1] ➔
[~/GITHUBAPI/gitgame1] ➔ php bin/console petkopara:generate:crud --overwrite
...
First, give the name of the existing entity for which you want to generate a CRUD
(use the shortcut notation like AcmeBlogBundle:Post)
The Entity shortcut name: GitteamBundle:Team
By default, the generator creates all actions: list and show, new, update, and delete.
You can also skip it and to generate only "list and show" actions:
Do you want to skip generating of the "write" actions [no]?
...
Everything is OK! Now get to work :).
[~/GITHUBAPI/gitgame1] ➔
http://symfony-howtos.blogspot.fr/2016/07/symfony-31-create-database-project-with.html https://github.com/petkopara/PetkoparaCrudGeneratorBundle