You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/operations.md
+22-8Lines changed: 22 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,9 @@ an implementation point of view, an operation is a link between a resource, a ro
6
6
<palign="center"class="symfonycasts"><ahref="https://symfonycasts.com/screencast/api-platform/operations?cid=apip"><imgsrc="../symfony/images/symfonycasts-player.png"alt="Operations screencast"><br>Watch the Operations screencast</a></p>
7
7
8
8
API Platform automatically registers typical [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) operations
9
-
and describes them in the exposed documentation (Hydra and Swagger). It also creates and registers routes corresponding
10
-
to these operations in the Symfony routing system (if it is available).
9
+
and describes them in the exposed documentation (Hydra and Swagger). It also creates and registers routes
10
+
for these operations in the Symfony routing system, if available, or in the Laravel routing system,
11
+
should that be the case.
11
12
12
13
The behavior of built-in operations is briefly presented in the [Getting started](getting-started.md#mapping-the-entities)
`PATCH` | no | Apply a partial modification to an element | yes
43
44
`DELETE` | no | Delete an element | yes
44
45
45
-
Note: the `PATCH` method must be enabled explicitly in the configuration, refer to the [Content Negotiation](content-negotiation.md) section for more information.
46
+
> [!NOTE]
47
+
> The `PATCH` method must be enabled explicitly in the configuration, refer to the [Content Negotiation](content-negotiation.md) section for more information.
46
48
47
-
Note: with JSON Merge Patch, the [null values will be skipped](https://symfony.com/doc/current/components/serializer.html#skipping-null-values) in the response.
49
+
---
48
50
49
-
Note: Current `PUT` implementation behaves more or less like the `PATCH` method.
50
-
Existing properties not included in the payload are **not** removed, their current values are preserved.
51
-
To remove an existing property, its value must be explicitly set to `null`.
51
+
> [!NOTE]
52
+
> With JSON Merge Patch, the [null values will be skipped](https://symfony.com/doc/current/components/serializer.html#skipping-null-values) in the response.
53
+
54
+
---
55
+
56
+
> [!NOTE]
57
+
> Current `PUT` implementation behaves more or less like the `PATCH` method.
58
+
> Existing properties not included in the payload are **not** removed, their current values are preserved.
59
+
> To remove an existing property, its value must be explicitly set to `null`.
52
60
53
61
## Enabling and Disabling Operations
54
62
@@ -64,7 +72,13 @@ for the `GET` method for both `collection` and `item` to create a readonly endpo
64
72
If the operation's name matches a supported HTTP method (`GET`, `POST`, `PUT`, `PATCH` or `DELETE`), the corresponding `method` property
65
73
will be automatically added.
66
74
67
-
Note: The `#[GetCollection]` attribute is an alias for `#[Get(collection: true)]`
75
+
> [!TIP]
76
+
> The `#[GetCollection]` attribute is an alias for `#[Get(collection: true)]`
77
+
78
+
---
79
+
80
+
> [!NOTE]
81
+
> In Symfony we use the term “entities”, while the following documentation is mostly for Laravel “models”.
Copy file name to clipboardExpand all lines: laravel/filters.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Parameters and Filters
2
2
3
-
API Platform is great for Rapid Application Development and provides lots of functionalities out of the box such as collection filtering with Eloquent. Most of the filtering is done using query parameters, which are automatically documented and validated. If needed you can use [state providers](core/state-providers) or a [Links Handler] to provide data.
3
+
API Platform is great for Rapid Application Development and provides lots of functionalities out of the box such as collection filtering with Eloquent. Most of the filtering is done using query parameters, which are automatically documented and validated. If needed you can use [state providers](../core/state-providers.md) or a [Links Handler] to provide data.
4
4
5
5
## Parameters
6
6
@@ -84,13 +84,13 @@ class Book extends Model
84
84
}
85
85
```
86
86
87
-
The documentation will output a query parameter per property that applies the `PartialSearchFilter` and also gives the ability to sort by name and id using: `/books?name=search&order[id]=asc&order[name]=desc`.
87
+
The documentation will output a query parameter per property that applies the `PartialSearchFilter` and also gives the ability to sort by name and ID using: `/books?name=search&order[id]=asc&order[name]=desc`.
88
88
89
89
## Filters
90
90
91
91
### Text
92
92
93
-
As shown above the following search filters are available:
93
+
As shown above the following search filters are available:
0 commit comments