-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
Wayfinder Version
0.1.12
Laravel Version
12.28.1
PHP Version
8.4.12
Description
Wayfinder does not support nested objects in query parameters with more than one level of depth. When passing nested objects, only the first level is serialized correctly, while deeper levels are ignored.
const options = {
query: {
search: 'Hello World',
filters: {
users: ['james', 'michael', 'john'],
attributes: {
visible: true,
status: 'example'
}
}
}
}
show.url(1, options) // Example route of the documentation
The example route of the documentation returns only the following URL /posts/1?search=Hello+World
The expected behavior is to have the nested objects properly serialized in the query string, resulting in a URL like /posts/1?search=Hello+World&filters[users][]=james&filters[users][]=michael&filters[users][]=john&filters[attributes][visible]=1&filters[attributes][status]=example
.
Steps To Reproduce
- Create a dummy route in Laravel
- Use the above
options
object to generate a URL with Wayfinder
Metadata
Metadata
Assignees
Labels
No labels