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")),
  )

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

Thank you in advance for yours responses !
Was this page helpful?