Method not allowed in TenantProfile page

Select::configureUsing(function (Select $select): void { $select ->native(false) ->searchable(fn (?Model $model): bool => (bool) $model) ->preload(); }); The error comes from searchable() configuration in AppServiceProvider.php
8 Replies
DrByte
DrByte6mo ago
Shouldn't it be Model $record instead of Model $model ? Filament's resolutions use the variable name, not the typehint. https://filamentphp.com/docs/3.x/forms/advanced#injecting-the-current-form-record
naungyehtet
naungyehtet6mo ago
Yes it should be $record
DrByte
DrByte6mo ago
Did that solve the error?
naungyehtet
naungyehtet6mo ago
It did not, the error came from searchable() not from injection.
DrByte
DrByte6mo ago
Removing your closure from searchable() works fine for my app, on the form in any Resource page.
naungyehtet
naungyehtet6mo ago
It is working in Resources and Pages.
DrByte
DrByte6mo ago
So, what's your goal/objective? What are you trying to accomplish? What's the business-problem you're trying to solve?
naungyehtet
naungyehtet6mo ago
Method not allowed in TenantProfile page. The error is from tenant profile page, the others are fine.