Skip to content

A base project with some bundle pre configred- fosuser- sonataadmin- fosrestSome example classes exists

Notifications You must be signed in to change notification settings

stef76/SymfonyStarter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZenSide SymfonyStarter

A ready-to-use Symfony2-REST-Angular project

  • sonata admin is on /web
  • angular is on /web/ng/app

Allow to start a fresh project with preconfigured bundles :

  • fosuser
  • sonata
  • rest

Symfony2 is used to back office data with sonata and offer a REST server to angular

A fresh Angular is preconfigured with npm and bower and some modules :

  • angular
  • angular-resource
  • bootstrap
  • jquery

A demo bundle (ZenSideDemoBundle) is present in S2 with some demo Entity, Admin & Rest route & controller

  • Sonata admin with Room wich contains Furnitures
  • Rest route & controller for users (only for nb demo)

To create a new project :

  • clone repository
  • remove .git folder In main folder :
  • composer update
  • php app/console doctrine:database:create
  • php app/console doctrine:schema:update --force
  • php app/console doctrine:fixtures:load
  • composer update In /web/ng folder :
  • npm install
  • bower install

Remove Demo Bundle from /src, /app/config.php, /app/routing.php to start a new Clean project. Develop Angular Front to fit your needs !

Ajouter une entité au REST

  1. créer l'entité "generate:doctrine:entity"
  2. ajouter les relations onetomany & manytoone
  3. annoter les champs à transmettre avec les annotations jos
  4. générer l'entity formType "generate:doctrine:form AcmeBlogBundle:Post" et l'adapter en fonction du besoin
  5. créer un controlleur REST dans /controller/api
  6. reférencer ce controlleur dans config_rest.yml
  7. ajouter une entrée dans le tableau des entités angular resources.yml
  8. enjoy GET, QUERY & POST !

About

A base project with some bundle pre configred- fosuser- sonataadmin- fosrestSome example classes exists

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 51.3%
  • ApacheConf 24.5%
  • JavaScript 14.2%
  • HTML 7.8%
  • CSS 2.2%