@@ -41,7 +41,7 @@ In this case, you'll need a ``Category`` class, and a way to relate a
4141
4242Start by creating a ``Category `` entity with a ``name `` field:
4343
44- ..code-block ::terminal
44+ ..code-block ::bash
4545
4646 $ php bin/console make:entity Category
4747
@@ -64,6 +64,8 @@ Start by creating a ``Category`` entity with a ``name`` field:
6464 This will generate your new entity class::
6565
6666 // src/Entity/Category.php
67+ namespace App\Entity;
68+
6769 // ...
6870
6971 class Category
@@ -99,7 +101,7 @@ the ``ManyToOne`` annotation. You can do this by hand, or by using the ``make:en
99101command, which will ask you several questions about your relationship. If you're
100102not sure of the answer, don't worry! You can always change the settings later:
101103
102- ..code-block ::terminal
104+ ..code-block ::bash
103105
104106 $ php bin/console make:entity
105107
@@ -144,6 +146,7 @@ the ``Product`` entity (and getter & setter methods):
144146 ..code-block ::php-annotations
145147
146148 // src/Entity/Product.php
149+ namespace App\Entity;
147150
148151 // ...
149152 class Product
@@ -214,7 +217,8 @@ class that will hold these objects:
214217 ..code-block ::php-annotations
215218
216219 // src/Entity/Category.php
217-
220+ namespace App\Entity;
221+
218222 // ...
219223 use Doctrine\Common\Collections\ArrayCollection;
220224 use Doctrine\Common\Collections\Collection;
@@ -310,8 +314,10 @@ Saving Related Entities
310314
311315Now you can see this new code in action! Imagine you're inside a controller::
312316
317+ // src/Controller/ProductController.php
318+ namespace App/Controller;
319+
313320 // ...
314-
315321 use App\Entity\Category;
316322 use App\Entity\Product;
317323 use Symfony\Component\HttpFoundation\Response;