public/rest_api/update?id=4&...
$id = $request->request->get('id');
$id = $request->query->get('id');
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Ost\BlogBundle\Services\Naming;
class TestController extends Controller
{
public function key(Naming $naming)
{
}
}
$response = new JsonResponse(['message' => 'Привет!']);
$response->setEncodingOptions(JSON_UNESCAPED_UNICODE);
return $response;
public function getParent()
{
return 'fos_user_registration';
}
fos_user:
db_driver: orm
firewall_name: main
user_class: AppBundle\Entity\User
registration:
form:
type: app_user_registration
app.registration.type:
class: AppBundle\Form\RegistrationType
tags:
- { name: form.type, alias: app_user_registration }
/**
* @Route("/url/{id}")
*/
public function editAction(Upload $upload)
{
...
}
$options = $this->getDoctrine()
->getRepository('AppBundle:Option')
->createQueryBuilder('o')
->select('o, v')
->join('o.values', 'v')
->getQuery()
->getResult();