Laravel Validation Unique Soft Remote

I have an entry in my database that is softly deleted, and if the user tries to create a new input with the same name, he will receive a validation error "name already exists"

What is the best practice to solve this problem?

Is it better to leave it because, perhaps, a soft deleted record will be restored, which will cause a conflict (if I somehow make it so that the user can insert a new record with the same name)

I don’t know what to do, but I’m sure that I’m not the only one who had this situation.

+4
source share
1 answer

Your use case is perfect for your entire architecture.

, (, ) , , .

, , , , ( )

.

+1

Source: https://habr.com/ru/post/1667128/


All Articles