I already have a mobile app that retrieve some data from database, show it to the user by php scripts that execute querys on a database, and return a json with results to my app.
I also have a desktop app that use other php scripts to retrieve data on same database, and next step is to implement a website too.
Now I think that having a script for each operation that my app support is not the best practice, so I've decided to use Symfony framework for organize my server scripts better.
For now I've created a new PHP Symfony project, replicated my database on localhost, generated a bundle for db operations, mapped sql tables, generated entities and generated a crud controller for each entity.
Now I don't know how to go ahead.
How can I make my project return only json messages for each operation (and not an html page with result as happen by default)?