Symfony in 2 minutes

localhost/Symfony/web/app_dev.php is the website.

To create new project, there are only 2 steps:

1. Create a route.

2. Create a bundle and change the controller.

The route is in /app/config/routing.yml

The application can have many bundles.

The bundle can be created with

> php app/console generate:bundle –namespace=CathySoft/CoolBundle

which will create

src/CathySoft/CoolBundle/ and register it with the “kernel”. Like so: $bundles = array ( new …)

and the controller is in src/CathySoft/CoolBundle/Controller/HelloController.php

namespace CathySoft\CoolBundle\Controller;
class HelloController {
     public function indexAction($name) {
         return new Response('Hello $name Thanks for visiting.');

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s