Validator takes 2 associative array:
Validator::make( $somethingToValidate, $rules);
Example:
$somethingToValidate = ['email'=>'[email protected]'];
$rules = ['email' => 'exists:staff,email,account_id,1'];
In this way rules defined at key 'email' are applied to value of key 'email' in $somethingToValidate array.
Usually the first parameter of Validator is Input::all() o Input::only() or Input::except().
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community