class PostController extends Controller
{
/**
* @param Request $request
* @Route("/post", name="post")
*/
public function newAction(Request $request)
{
// create a Post and give it some du
如下因素教程的請求屬性? '_controller'=> function ($request) {
的路線聲明發現: $routes->add('hello', new Routing\Route('/hello/{name}', array(
'name' => 'World',
'_controller'=> function ($request) {
re
我有一個用戶從一個數據庫,其中有一個工作刪除按鈕的列表。 這裏是我的控制器: <?php
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
我試圖處理這個問題: 我的應用程序發送JSON POST請求與幾個信息編碼在一個JSON。例如: {"UserInfoA":{"1":123,"2":"hello","3":"bye","4":{"subinfo":1,"subinfo2":10}},
"UserInfoB":{"a":"12345678","b":"asd"}} // and so on...
各自的UserInfo具有: