F
Filament4mo ago
morty

Does the preload option work with a custom query like below?

SelectFilter::make('country_code')
->multiple()
->label('Country')
->options(function () {
$countries = Account::distinct()
->orderBy('country_code')
->pluck('country_code');

return $countries->combine($countries);
})
->preload(),
SelectFilter::make('country_code')
->multiple()
->label('Country')
->options(function () {
$countries = Account::distinct()
->orderBy('country_code')
->pluck('country_code');

return $countries->combine($countries);
})
->preload(),
I was reading the documentation about the preload() method that preloads relationships from the database but in my case will it also preload the options from the database?
0 Replies
No replies yetBe the first to reply to this messageJoin