© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
1 reply
D5300

Set description for CheckboxList dynamically

Hi, how can I access the collection which is loaded from the relations method? I dont see how I can access the relationship data

CheckboxList::make('menuSections')
  ->hiddenLabel()
  ->relationship('sections', 'title')
  ->descriptions(function ($collection) {
    return $collection->pluck('description', 'id')->toArray();
  })
  ->bulkToggleable()
CheckboxList::make('menuSections')
  ->hiddenLabel()
  ->relationship('sections', 'title')
  ->descriptions(function ($collection) {
    return $collection->pluck('description', 'id')->toArray();
  })
  ->bulkToggleable()
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

CheckboxList - set description from relationship record
FilamentFFilament / ❓┊help
3y ago
CheckboxList description with relationships
FilamentFFilament / ❓┊help
3mo ago
CheckboxList description per option?
FilamentFFilament / ❓┊help
3y ago
Set default checkboxlist value
FilamentFFilament / ❓┊help
3y ago