unique email with deleted_at
How can i exclude records, which are marked as deleted from the email validation unique?
I also need this function:
and i want to inlcude additional something like this:
how would look all together please?
6 Replies
Deleted records should be excluded by default using SoftDeletes if setup correctly they should always be hidden unless explicity shown.
Then you would use a trashed filter in the list where for showing trashed items as per:
https://filamentphp.com/docs/2.x/tables/filters
Thanks for your answer.
I have in the model:
and i have
so that should work out of the box you say?
i will test again. Thanks
So you have told it to remove the global scope so now it will show soft deletes by default
For it to work, you need to finish the Filament SoftDeletes integration with the Trashed Filter
Therefore the scope you are using on the above shouldn't included soft deletes
You will need to double check. Worst case write a custom rule