We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 380e488 commit 09ce5f4Copy full SHA for 09ce5f4
MyApplication/src/AppBundle/Controller/ArticlesController.php
@@ -2,16 +2,20 @@
2
3
namespace AppBundle\Controller;
4
5
-use FOS\RestBundle\Controller\FOSRestController;
6
-
7
-class ArticlesController extends FOSRestController
+class ArticlesController
8
{
9
+ /**
+ * Note: here the name is important
10
+ * get => the action is restricted to GET HTTP method
11
+ * Article => (without s) generate /articles/SOMETHING
12
+ * Action => standard things for symfony for a controller method which
13
+ * generate an output
14
+ *
15
+ * it generates so the route GET .../articles/{id}
16
+ */
17
public function getArticleAction($id)
18
19
return array('hello' => 'world');
20
}
21
0 commit comments