Refer Symfony 2 Tutorial - Creating a blogging website [http://tutorial.symblog.co.uk]