@@ -42,7 +42,7 @@ they can share common bundles, configurations, and code if desired. The optimal
42
42
needs and requirements, so it's up to you to decide which best suits your project.
43
43
44
44
First, let's create a new ``apps `` directory at the root of your project, which will hold all the necessary applications.
45
- Each application will follow a simplified directory structure:
45
+ Each application will follow a simplified directory structure like the one described in :ref: ` Symfony Best Practice < /best_practices >` :
46
46
47
47
.. code-block :: text
48
48
@@ -292,18 +292,18 @@ Then, run `composer auto-scripts` to test it!
292
292
Rendering Templates
293
293
-------------------
294
294
295
- If you adhere to the Symfony Best Practices, the shared Kernel templates will be located in the `` templates/ `` directory
296
- at the project's root. For API -specific templates, you can create a new directory in `` apps/api/templates/ ``, which you
297
- will need to configure manually under the API application:
295
+ Let's assume there is now another app called `` admin ``. If you follow the :ref: ` Symfony Best Practices < /best_practices >`, the shared Kernel
296
+ templates will be located in the `` templates/ `` directory at the project's root. For admin -specific templates, you can
297
+ create a new directory `` apps/admin/templates/ `` which you will need to manually configure under the Admin application:
298
298
299
299
.. code-block :: yaml
300
300
301
- # apps/api /config/packages/twig.yaml
301
+ # apps/admin /config/packages/twig.yaml
302
302
twig :
303
303
paths :
304
- ' %kernel.project_dir%/apps/api /templates ' : Api
304
+ ' %kernel.project_dir%/apps/admin /templates ' : Admin
305
305
306
- Then, use this Twig namespace to reference any template within the API application only, for example ``@Api/schema/doc.json .twig ``.
306
+ Then, use this Twig namespace to reference any template within the Admin application only, for example ``@Admin/form/fields.html .twig ``.
307
307
308
308
Running Tests
309
309
-------------
@@ -377,9 +377,9 @@ configuration and permissions. To do that, you will have to repeat the step 1 on
377
377
├─ apps/
378
378
│ ├─ admin/
379
379
│ │ ├─ config/
380
- │ │ │ ├─ bundles.php
380
+ │ │ │ ├─ bundles.php
381
381
│ │ │ ├─ routes.yaml
382
- │ │ │ └─ services.yaml
382
+ │ │ │ └─ services.yaml
383
383
│ │ └─ src/
384
384
│ └─ api/
385
385
│ └─ ...
0 commit comments