请JsonResponse
改用.
示例:
$items = array(1 => 'item 1', 2 => 'item 2'); return new JsonResponse($items);
请参阅http://symfony.com/doc/current/components/http_foundation/introduction.html
请JsonResponse
改用.
示例:
$items = array(1 => 'item 1', 2 => 'item 2'); return new JsonResponse($items);
请参阅http://symfony.com/doc/current/components/http_foundation/introduction.html