Imagine that you need to define a validation rule which specifies that the provided email address must be unique on the users table, limited to the email column, where the person's active status is set to
true, but excluding the current user's email address. As you may know, traditionally, we must provide a comma separated list within a string for all of these parameters. It's pretty rough! But not anymore. Now, in Laravel 5.3, you can use the useful
Rule class to fluently build up these constraints.
Published on Oct 25th, 2016.
Understand.io is used by hundreds of Laravel developers to find and fix errors.
Sign up for a free 14-day trial now.