low-res (Paul)
unique validation on soft-deleted records
Thx for your help. Unfortunately your solution did not work, but I solved myself. It's actually much easier (as I was expcting from filament :))
->unique( ignoreRecord: true, callback: function( Unique $rule ){
return $rule->whereNull('deleted_at');
} )
is all that is needed.8 replies
How to test table with filter form
Thanks @Dan Harrin for your answer! But my filter is a pretty complex form, with about 20 TextInput and Select formfields. Not just a "simple" filtervalue. My example just contains one TextInput (
TextInput::make('hawb')
) for the sake of better overview. But there are much more fields included. Arranged in a grid with collabsable sections and so on. More like it is described here (https://filamentphp.com/docs/2.x/tables/filters#custom-filter-forms). So I only have this single Filter::make call that contains the whole filterform. Or is that already the wrong approach?8 replies