laravel / nova-issues

554 stars 34 forks source link

MorphToMany has no method relatableQueryUsing() #6493

Closed msucevan closed 1 month ago

msucevan commented 1 month ago

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();
            })