Creating an Application and API with ‘silex-skeleton-app’

posted in: Silex, Standards | 1

For the UI Application to work, you need to purchase xCRUD

The starter project repo is here –

Clone the project.

$ git clone
$ composer update

from the root of your project

Then you are ready to generate some code:

php app/console generate:appbundle User user_name:string user_surname:string --migration    
php app/console generate:appbundle Location loc_name:string premises:string —migration
php app/console generate:appbundle Bank bank_name:string surname:string premises:integer amount:integer --migration

Check your Unit Tests

./vendor/bin/phpunit -c app/

Go to /src/Bank/BankBundle/Core/ControllerCore.php
Add relations to ‘premises’ and ‘user’ tables


So it should look like this:

         * crud
        $controller->get("/crud", function() use ($app, $targetRepository) {
            $xcrud = $app['xcrud'];
            return $app['twig']->render('xcrud.twig', array(
                'xcrud' => $xcrud,
                'className' => $this->repository

If you want some test data for the unit tests or just to play with, re-use/re-run your last generator command with –sql it will create a SQL script for the entities you scaffolded.
Install your generated Database from /db/db.sql

Now you should also see the drop down navigation working with the ‘bundle’ or ‘module’ names listed.


Screen Shot 2014-03-13 at 3.25.01 PM


Screen Shot 2014-03-13 at 3.25.18 PM


Screen Shot 2014-03-13 at 3.25.31 PM

One Response

Leave a Reply