Custom Laravel Validator for combined unique indexes If nothing happens, download GitHub Desktop and try again.
This package contains a variant of the validateUnique rule for Laravel, that allows for validation of multi-column UNIQUE indexes.
For example, if your model uses soft deleting then you can use the following code to select all existing rows but marked as deleted
To solve this problem, add 'deleted_at' => null to Your validation parameters in request class., e.g.: If we have a connection named some-database, we can enforce this connection (rather than the default) like this: Pretend you have a users table in your database plus User model like this: Now you can validate a given first_name, last_name combination with something like this: