Skip to content

Commit

Permalink
JM tech review 3
Browse files Browse the repository at this point in the history
  • Loading branch information
rustagir committed Jun 7, 2024
1 parent 1f5d6fd commit c052d89
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 27 deletions.
1 change: 0 additions & 1 deletion source/includes/php-frameworks/symfony/Restaurant.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
use Doctrine\ODM\MongoDB\Types\Type;

#[ODM\Document(collection: 'restaurants')]
class Restaurant
Expand Down
2 changes: 1 addition & 1 deletion source/includes/php-frameworks/symfony/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

{% block body %}
<h1>Welcome to the Symfony MongoDB Quickstart!</h1>
{% endblock %}
{% endblock %}
25 changes: 0 additions & 25 deletions source/php-frameworks/symfony.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,31 +255,6 @@ field is ``'Queens'`` and the ``name`` field contains the string ``'Moon'``.
This method then displays the documents at the ``/restaurant/browse/`` route. The
``browse()`` method uses the ``QueryBuilder`` class to construct the query.

Specify Routes
``````````````

In the ``config/routes.yaml`` file, add the following routes:

.. code-block:: yaml
:caption: config/routes.yaml

# main routes
restaurant_index:
path: /
controller: App\Controller\RestaurantController::index
methods: [GET]

# browse restaurants
restaurant_browse:
path: /restaurant/browse
controller: App\Controller\RestaurantController::browse
methods: [GET]

This file sets the following routes in the application:

- ``restaurant_index [GET]``: landing page
- ``restaurant_browse [GET]``: retrieves and displays specific restaurants

Customize Templates
```````````````````

Expand Down

0 comments on commit c052d89

Please sign in to comment.