Created
January 9, 2015 05:48
-
-
Save vinacode/f00d447d4ed25a2a225f to your computer and use it in GitHub Desktop.
Symfony2 command line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################### | |
******Symfony 2**** | |
#Command list | |
php app/console list | |
#Clear cache | |
php app/console cache:clear | |
php app/console cache:clear --env=prod --no-debug | |
php app/console generate:bundle --namespace=Acme/TestBundle | |
php app/console assets:install web | |
php app/console assets:install --symlink web | |
php app/console router:debug | |
php app/console router:debug article_show | |
#Create Bundle | |
1.php app/console generate:bundle --namespace=PitchPartner/CoreBundle --format=yml | |
2.php app/console init:bundle "SfTuts\JobeetBundle" src | |
# Build db from yml file | |
php app/console doctrine:schema:update -force | |
# Build yml file from db | |
php app/console doctrine:mapping:convert yml ./src/PitchPartner/CoreBundle/Resources/config/doctrine/metadata/orm --from-database --force | |
# Build maping entities | |
php app/console doctrine:mapping:import CoreBundle annotation | |
#Generate auto Repository >> getter, setter and repository for entity | |
- add this row: @ORM\Entity(repositoryClass="PitchPartner\CoreBundle\Repository\UserRepository") | |
to PitchPartner\CoreBundle\Entity\User.php | |
- php app/console doctrine:generate:entities CoreBundle | |
#####Include css, js, images##### | |
1. src/SomeName/MyBundle/Resources/public/...(css/,js/,images/) | |
2. <img src="{{ asset('bundles/somenamespacemyawesome/images/someimage.jpg') }}" /> | |
3. php app/console assets:install ./web_admin/ --env=admin_prod | |
php app/console assets:install web | |
4. php app/console assetic:dump --env=admin_prod (for tinyMCE) | |
php app/console assetic:dump --env=prod --no-debug |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment