F
Filamentagragaurav

How to specify ignoreRecord in unique rule in Import?

I've added an import action to a model with option to update existing record via firstOrNew method. Now, I wish to have the unique rule applied on a column, but only when the record is not being updated with the same value. Typical laravel way for this is to ignore record with matching id. However, how do I specify this in the rules() parameter for a column in getColumns method of an Importer?
AL
Albert Lens40d ago
->unique(ignoreRecord: true) ?
A
agragaurav39d ago
Method Filament\Actions\Imports\ImportColumn::unique does not exist.