dongpao9165
dongpao9165
2017-05-26 19:19

如何向android / ios应用程序提供symfony内容?

  • android
  • web-applications
  • php
  • ios
  • symfony

I plan to add access to android & ios developers to content form Symfony 3 data. Now, access is by web browser. I've expanded logic on Controller but sharing is simple by TWIG/HTML pages. ex.

/**
* Class DefaultController
* 
* @Route("/item")
*
* @package SameBundle\Controller
*/
class DefaultController extends Controller
{
   /**
   * Lists all Product entities.
   *
   * @Route("/", name="product_index")
   * @Method("GET")
   *
   * @Template
   */
   public function indexProductAction()
   {
     // (...) 

     return ['products' => $products,];
}

It is supported by the indexProduct.html.twig page.

What do I have to add to controller/function to doing it?

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答

为你推荐