Category: Laravel

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:
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners