Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where the nested relation Model dose not work properly with inertiajs. #154

Closed
devbapidey opened this issue Mar 21, 2021 · 1 comment
Closed

Comments

@devbapidey
Copy link

devbapidey commented Mar 21, 2021

laravel 8.33
eloquent-filter 2.4.6

I am using eloquent-filter with inertiajs. Now using array query string like this item[price] is not possible in .vue file. I have to convert it to a string like 'item[price]'.

So my final method in vue file look like this
methodName(){ this.$inertia.get({ data: { item[price]: this.item.price, }, }) }

But problem is when I select different price it send &item[price]=100&item[price]=200
and this is default behavior of inertiajs, Which I don't want. Is it possible to use different identifier for nested relation Model?

@mehdi-fathi
Copy link
Owner

@devbapidey You can make a new array before the filter and pass it to the filter method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants