text Symfony 3 - Anotations
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text Symfony 3 - Anotations相关的知识,希望对你有一定的参考价值。
## Instalar Symfony ##
php composer.phar install
## Dependencia Composer - Install ##
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
## CONSOLE ##
- Generar un nuevo bundle -> php bin/console generate:bundle
- Ver todas las rutas creadas -> php bin/console debug:router
- Información detallada de la ruta -> php bin/console debug:router pam_user_edit
- Generar un nuevo formulario -> php bin/console doctrine:generate:form PAMUserBundle:User
- Limpiar la caché -> php bin/console cache:clear
- Generar enlaces simbólicos -> php bin/console asset:install --symlink
- Borrar debug mode y app_dev.php -> php bin/console cache:clear --env=prod --no-debug
- Optimiza el autoload con las clases que se utilizan: composer dump-autoload --optimize --no-dev --classmap-authoritative
## ENTIDADES (Tablas DB) ##
- Generar una nueva entidad -> php bin/console doctrine:generate:entity
- Actualizar crear entidad en la DB -> php bin/console doctrine:schema:update --force
## Assetic (Clean and build new packages) ##
php bin/console cache:clear
php bin/console assets:install --symlink
php bin/console assetic:dump
php bin/console cache:clear && php bin/console assets:install --symlink && php bin/console assetic:dump && php bin/console cache:clear --env=prod --no-debug
## TWIG ##
- {{ }} // = echo
- {% %} // = foreach
- {# #} // = Comment
- Agregar un link a un path directamente con el acceso al bunddle -> <a class="nav-link" href="{{ path('pam_user_add') }}">New user</a>
## API ##
Require:
- http://symfony.com/doc/current/bundles/FOSRestBundle/1-setting_up_the_bundle.html
- https://github.com/schmittjoh/JMSSerializerBundle
- https://github.com/nelmio/NelmioCorsBundle
- https://github.com/voryx/restgeneratorbundle
Documentation:
- https://www.sgalinski.de/news/technik/how-to-create-a-basic-rest-api-in-symfony/
- http://rootstack.com/es/blog/construyendo-un-restful-api-con-symfony-2-parte-2
- http://jeremycurny.com/2016/03/27/symfony3-rest-api/
- https://www.youtube.com/watch?v=fglsV7Wpwnw
- http://symfony.com/doc/master/bundles/FOSRestBundle/3-listener-support.html
- http://npmasters.com/2012/11/25/Symfony2-Rest-FOSRestBundle.html
Console:
- Generar Bundle Rest -> php bin/console voryx:generate:rest
## USERS ##
- New User-> php bin/console fos:user:create client1
- New Client Public -> php bin/console oauth:client:create client1
## PROBLEMAS COMUNES ##
- Permisos en el directorio
以上是关于text Symfony 3 - Anotations的主要内容,如果未能解决你的问题,请参考以下文章
text faker fixtures symfony
text symfony bootstrap
text Symfony常用命令
text symfony4结构
text Salida instalacion Symfony
text symfony4-start.txt