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
DrByte12mo 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
naungyehtetOP12mo ago
Yes it should be $record
DrByte
DrByte12mo ago
Did that solve the error?
naungyehtet
naungyehtetOP12mo ago
It did not, the error came from searchable() not from injection.
DrByte
DrByte12mo ago
Removing your closure from searchable() works fine for my app, on the form in any Resource page.
naungyehtet
naungyehtetOP12mo ago
It is working in Resources and Pages.
DrByte
DrByte12mo ago
So, what's your goal/objective? What are you trying to accomplish? What's the business-problem you're trying to solve?
naungyehtet
naungyehtetOP12mo ago
Method not allowed in TenantProfile page. The error is from tenant profile page, the others are fine.
Want results from more Discord servers?
Add your server