File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -110,8 +110,9 @@ for the homepage of our app:
110
110
*/
111
111
public function indexAction()
112
112
{
113
- $em = $this->getDoctrine()->getManager();
114
- $posts = $em->getRepository('App:Post')->findLatest();
113
+ $posts = $this->getDoctrine()
114
+ ->getRepository('AppBundle:Post')
115
+ ->findLatest();
115
116
116
117
return $this->render('default/index.html.twig', array(
117
118
'posts' => $posts
@@ -136,6 +137,7 @@ For example:
136
137
137
138
.. code-block :: php
138
139
140
+ use AppBundle\Entity\Post;
139
141
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
140
142
141
143
/**
@@ -146,7 +148,7 @@ For example:
146
148
$deleteForm = $this->createDeleteForm($post);
147
149
148
150
return $this->render('admin/post/show.html.twig', array(
149
- 'post' => $post,
151
+ 'post' => $post,
150
152
'delete_form' => $deleteForm->createView(),
151
153
));
152
154
}
@@ -188,8 +190,10 @@ flexible:
188
190
189
191
.. code-block :: php
190
192
193
+ use AppBundle\Entity\Post;
191
194
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
192
195
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
196
+ use Symfony\Component\HttpFoundation\Request;
193
197
194
198
/**
195
199
* @Route("/comment/{postSlug}/new", name = "comment_new")
You can’t perform that action at this time.
0 commit comments