Created
March 28, 2020 16:16
-
-
Save RoySegall/adff2145b960f0bd3c1f1233d61b116d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BlogApiController extends AbstractController | |
{ | |
/** | |
* @Route("/api/posts/{id}", methods={"GET","HEAD"}) | |
*/ | |
public function show(int $id) | |
{ | |
// ... return a JSON response with the post | |
} | |
/** | |
* @Route("/api/posts/{id}", methods={"PUT"}) | |
*/ | |
public function edit(int $id) | |
{ | |
// ... edit a post | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment