Relation with where id check doesnt work like i want it

I have this piece of code that allows searching all the assets

     Select::make('asset_id')
                        ->label('Selecteer aan middel')
                        ->searchable([
                            'name','identifier'
                        ])
                        ->relationship('asset','full_name')


but now i want them filtered on a organisation_id
this is what i did in the model.

public function asset()
    {
        return $this->belongsTo(Asset::class)->where('organisation_id', Filament::auth()->user()->organisation_id);
    }


but when i check it with Telescope i see that the organisation_id check is never performed. Anyone tips for me ?
Solution
Stack Overflow
I've started using Filament PHP for creating a Laravel based intranet application but stumbled across a question I couldn't answer myself using the official documentation:
What's the easiest way to...
Was this page helpful?