Skip to main content

Một số command trong Symfony 2

· One min read
Tien
  1. cache logs
rm -rf app/cache/\*
rm -rf app/logs/\*
sudo chmod 777 -R app/cache app/logs
  1. config visual http://website.com/web/app_dev.php/_configurator/step/0

  2. parameters.yml:

parameters:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_port: null
database_name: db_name
database_user: root
database_password: null
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
locale: en
secret: b998a210c4981883d4447fa4a6bea331d
database_path: null
  1. bundle php
app/console generate:bundle --namespace=NameSpace/Bundle --dir=yml --format=yml
  1. doctrine
doctrine:schema:drop --force doctrine:schema:create
  1. entities:
doctrine:generate:entity --entity="NameSpaceBundle:Entity" --fields="title:string body:text tags:text created:datetime updated:datetime"
doctrine:generate:entities NameSpace
  1. fixtures and migrations
php app/console doctrine:migrations:diff
php app/console doctrine:migrations:migrate
php app/console doctrine:fixtures:load
  1. assests
php app/console assets:install web --symlink
  1. đánh dấu

http://symfony2admingenerator.org/installation.html