We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f9cd04 commit 30be86aCopy full SHA for 30be86a
core/default-order.md
@@ -59,6 +59,29 @@ class Book
59
}
60
```
61
62
+It's also possible to configure the default filter on an association property:
63
+
64
+<?php
65
66
+// src/AppBundle/Entity/Book.php
67
68
+namespace AppBundle\Entity;
69
70
+use ApiPlatform\Core\Annotation\ApiResource;
71
72
+/**
73
+ * @ApiResource(attributes={"order"={"author.username"}})
74
+ */
75
+class Book
76
+{
77
+ // ...
78
79
+ /**
80
+ * @var User
81
82
+ public $author;
83
+}
84
85
Previous chapter: [Operations](operations.md)
86
87
Next chapter: [Filters](filters.md)
0 commit comments