Home  >  Article  >  Backend Development  >  Help for newbies: symfony has problems using doctrine Persisting Objects to the Database

Help for newbies: symfony has problems using doctrine Persisting Objects to the Database

WBOY
WBOYOriginal
2016-07-06 13:51:33788browse

New to symfony: completely follow the official website documentation and place createAction in DefaultController.php

The following prompts that routing needs to be set before accessing
I add
/**

  • @Route("/api")
    */
    before createAction and an error will occur when accessing http://localhost/symfony/web/api. How to set up this route can be accessed from the front desk. Please help. Thank you

Reply content:

New to symfony: completely follow the official website documentation and place createAction in DefaultController.php

The following prompts that routing needs to be set before accessing
I add
/**

  • @Route("/api")
    */
    before createAction and an error will occur when accessing http://localhost/symfony/web/api. How to set up this route can be accessed from the front desk. Please help. Thank you

How to call this method directly from outside http://localhost/symfony/web/api and how to call it in other methods? Could someone please help me look at it

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn