User select

Hello, I'm starting to use FilamentPHP and would like to ask a question. How do I limit the user select to display only those with the role of realtor? I use this plugin:

https://v2.filamentphp.com/plugins/althinect-spatie-roles-permissions

   public static function form(Form $form): Form
    {
        return $form
            ->schema([
                Forms\Components\Select::make('user_id')
                    ->relationship('user', 'name')
                    ->searchable()
                    ->label(__('Realtor'))
                    ->required(),
                Forms\Components\TextInput::make('title')
                    ->required()
                    ->maxLength(255),
                Forms\Components\Textarea::make('description')
                    ->columnSpanFull(),
                Forms\Components\TextInput::make('status')
                    ->required(),
            ]);
    }
Filament
Resources for Roles and Permissions.
Generate Permissions based on Models and Resources.
Generate Policies.
Manage Permissions for teams.
Was this page helpful?