© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
7 replies
Moudjames23

Get current value of SelectConstraint

Hello,

I want to do some filters in my table but I'm having trouble getting current value of my select.

Here is my code:

SelectConstraint::make('competences')
  ->label("Compétences")
  ->searchable()
  ->options(
      Technology::pluck("name", "id")
  )
  ->relationship(
      name: 'competences',
      titleAttribute: 'id',
      modifyQueryUsing: fn (Builder $query, Forms\Get $get) => $query->where('technologie_id', $get("competences")),
  )
SelectConstraint::make('competences')
  ->label("Compétences")
  ->searchable()
  ->options(
      Technology::pluck("name", "id")
  )
  ->relationship(
      name: 'competences',
      titleAttribute: 'id',
      modifyQueryUsing: fn (Builder $query, Forms\Get $get) => $query->where('technologie_id', $get("competences")),
  )

My table competences has this fields: id, technologie_id, candidat_id, annee

Thank you in advance for yours responses !
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

Get current value of table filter
FilamentFFilament / ❓┊help
2y ago
SelectConstraint Width?
FilamentFFilament / ❓┊help
6mo ago
How to get State of SelectConstraints
FilamentFFilament / ❓┊help
2y ago
Get count of current online users
FilamentFFilament / ❓┊help
3y ago