Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions symfony/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ Modify these files as described in these patches:
**Tip**: You can use Symfony [MakerBundle](https://symfonycasts.com/screencast/symfony-fundamentals/maker-command?cid=apip) to generate a Doctrine entity that is also a resource thanks to the `--api-resource` option:

```console
bin/console make:entity --api-resource
docker compose exec php bin/console make:entity --api-resource
```

Doctrine's [attributes](https://www.doctrine-project.org/projects/doctrine-orm/en/current/reference/attributes-reference.html) map these entities to tables in the database.
Expand All @@ -486,8 +486,8 @@ Now, delete the file `api/src/Entity/Greeting.php`. This demo entity isn't usefu
Finally, generate a new database migration using [Doctrine Migrations](https://symfony.com/doc/current/doctrine.html#migrations-creating-the-database-tables-schema) and apply it:

```console
bin/console doctrine:migrations:diff
bin/console doctrine:migrations:migrate
docker compose exec php bin/console doctrine:migrations:diff
docker compose exec php bin/console doctrine:migrations:migrate
```

**We now have a working API with read and write capabilities!**
Expand Down Expand Up @@ -681,7 +681,7 @@ Isn't API Platform a REST **and** GraphQL framework? That's true! GraphQL suppor
need to install the [graphql-php](https://webonyx.github.io/graphql-php/) library. Run the following command:

```console
composer require api-platform/graphql
docker compose exec php composer require api-platform/graphql
```

You now have a GraphQL API! Open `https://localhost/graphql` (or `https://localhost/api/graphql` if you used Symfony Flex
Expand Down