Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace BlogBundle\Controller;
- use Symfony\Bundle\FrameworkBundle\Controller\Controller;
- use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
- class WpisController extends Controller
- {
- /**
- * @param int $id
- * @return \Symfony\Component\HttpFoundation\Response
- */
- public function indexAction($id)
- {
- $repository = $this->getDoctrine()->getRepository('BlogBundle:Wpis');
- $post = $repository->find($id);
- if ($post === null) {
- throw $this->createNotFoundException();
- }
- return $this->render('BlogBundle:Wpis:show.html.twig', ['post'=>$post]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement