MorphToMany has no method relatableQueryUsing() #6494
-
Description:As documented the MorphToMany field is searchable, but the method relatableQueryUsing() does not exist. Detailed steps to reproduce the issue on a fresh Nova installation:\Laravel\Nova\Fields\MorphToMany::make(__('Factors'), 'factors', FactorResource::class)
->searchable()
->showCreateRelationButton()
->relatableQueryUsing(function (NovaRequest $request, Builder $query) {
return $query->withoutOriginal();
}) |
Beta Was this translation helpful? Give feedback.
Answered by
crynobone
Jan 8, 2025
Replies: 2 comments
-
I stumbled upon this today while I was working on creating a MorphToMany relation field. Since it's not supported by default, did you manage to find a solution for this? The relatableQuery and reletable{MyModel} doesn't seem to be triggered. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Implemented in 5.1.0 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
crynobone
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Implemented in 5.1.0