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
Global search is broken, when using NestedForm #124
Comments
i have the same issue. Did you manage to fix it or have a workaround? |
Nope. I haven't fixed this issue yet. |
The problem is in src/NestedForm.php:200 which got introduced in commit 0905cca . I'm not sure what it actually does, but latest Nova seems to work without it. |
tomheno
pushed a commit
to tomheno/laravel-nova-nested-form
that referenced
this issue
Feb 7, 2022
By adding a condition before src/NestedForm.php:200 line, the search is working again : // Added this condition, so the error doesn't occur when the request is a GlobalSearchRequest
if(get_class(app(NovaRequest::class)) !== "Laravel\Nova\Http\Requests\GlobalSearchRequest")
$this->resolve(app(NovaRequest::class)->model()); Did a PR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a resource
User
with a nested FormPosts
, just like the example in the documentation:Now, the global search is broken, since the API (/nova-api/search?search=test) returns a 404 error instead of the json result. Commenting out the nested form and everything works as expected.
The relation itself work. When I add the HasMany field (and leave the NestedForm commented out), everything still works as expected:
The text was updated successfully, but these errors were encountered: