TextInput::make('item_code')
->label('Artikelcode')
->required()
->maxLength(255)
->rule(function (Get $get) {
return Rule::unique('products', 'item_code')
->where(fn ($query) => $query->where('brand_id', $get('brand_id')))
->ignore(request()->route('record'));
}),
TextInput::make('item_code')
->label('Artikelcode')
->required()
->maxLength(255)
->rule(function (Get $get) {
return Rule::unique('products', 'item_code')
->where(fn ($query) => $query->where('brand_id', $get('brand_id')))
->ignore(request()->route('record'));
}),