Hasan Tahseen
Hasan Tahseen
FFilament
Created by Hasan Tahseen on 5/31/2025 in #❓┊help
Confusing Attributes in getSearchResults Method For Select From Field
Ok, Sounds good. thanks for the clarifications
6 replies
FFilament
Created by Hasan Tahseen on 5/29/2025 in #❓┊help
Select Field Relationship have no limit
13 replies
FFilament
Created by Hasan Tahseen on 5/29/2025 in #❓┊help
Select Field Relationship have no limit
Ok I will work on it
13 replies
FFilament
Created by Hasan Tahseen on 5/29/2025 in #❓┊help
Select Field Relationship have no limit
No description
13 replies
FFilament
Created by Hasan Tahseen on 5/29/2025 in #❓┊help
Select Field Relationship have no limit
Forms\Components\Select::make('project_id')
->searchable()
->optionsLimit(10)
->relationship('project', 'title')
Forms\Components\Select::make('project_id')
->searchable()
->optionsLimit(10)
->relationship('project', 'title')
first. this code will result (timeout exceed error) for relations with big data. please see the implementation of relationship method especially the part of $this->options which will not use (optionsLimit) in it core which result to load all the data.
->options(Project::limit(10)->get()->pluck('title', 'id'))
->options(Project::limit(10)->get()->pluck('title', 'id'))
secondly. above code is better approach since if I use the (fn ()) approach will make the callback method in options a computed method which means the select field will fire a livewire request each time I open and close the select field (which is wrong in my example since I will only display static data that will not relay on any other field and will load when the page is loaded). and the using of getSearchResultsUsing is for searching the records. I will only display 10 or 50 records in the options (and even if I used the fn () approach it will not making it searchable by database also with searchable will not making it search on database). So the only solution here is to specify the limit in the options and the getSearchResultsUsing method So that all things works as expected. please read this docs https://filamentphp.com/docs/3.x/forms/fields/select#returning-custom-search-results.
13 replies
FFilament
Created by Muhammad Umar Mughal Azeemi on 5/29/2025 in #❓┊help
Issue in Media Library Plugin at the time of upload image
check the logs in your laravel.log and also check the network response for it to debug it more.
30 replies
FFilament
Created by Hasan Tahseen on 5/29/2025 in #❓┊help
Select Field Relationship have no limit
there is one called optionsLimit which will not make any effect because it working on the getSearchResultsUsing method and not the options method
13 replies
FFilament
Created by Hasan Tahseen on 5/29/2025 in #❓┊help
Select Field Relationship have no limit
there is no limit method in Select field ":)"
13 replies