How to filter what suggestions SpatieTagsInput shows?

I want to prevent user-generated tags from being suggested in my SpatieTagsInput components. The obvious reason being that a malicious user might spam the database with inappropriate tags which would then be suggested.
Forms\Components\SpatieTagsInput::make('skills')
->type('skill'),
Forms\Components\SpatieTagsInput::make('keywords')
->type('keyword'),
Forms\Components\SpatieTagsInput::make('skills')
->type('skill'),
Forms\Components\SpatieTagsInput::make('keywords')
->type('keyword'),
It doesn't seem as straightforward as simply adding an approved boolean column to my Spatie tags table and then defining a scope.
No description
2 Replies
Tally
Tally7mo ago
If you don't want users to create new tags I would use another component multiselect for example to select the possible tags.
Dan Harrin
Dan Harrin7mo ago
->suggestions([])
Want results from more Discord servers?
Add your server