unique multiple columns

please help me, how can i set unique with condition

data example:
Toyota Avanza G V
Toyota Alphard G X (but can't create, return message The Name Has Already been taken)
Toyota Avanza G X

this is my code:

Forms\Components\TextInput::make('name')
->required()
->unique(Type::class, 'name')
->columnSpan(2),
image.png
Was this page helpful?