Advertisement
sanjiisan

Untitled

Sep 12th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <?php
  2.  
  3. namespace CoderslabBundle\Controller;
  4.  
  5. use CoderslabBundle\Entity\Article;
  6. use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  7. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
  8.  
  9. class DefaultController extends Controller
  10. {
  11. /**
  12. * @Route("/showArticle/{id}/")
  13. */
  14. public function showArticleAction($id)
  15. {
  16. $article = Article::GetArticlebyId($id);
  17.  
  18. return $this->render('CoderslabBundle:Article:showArticle.html.twig',
  19. [
  20. 'article' => $article
  21. ]
  22. );
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement