Is there any validation expression like unique: in Laravel that return true if value exist in database for the :attribute like. Have a look at email attribute:-
$data=[]
$rules= ['email': 'exist_in_database']
$validator=Validator::make($data,$rules);
if($validator->passes()){
//do something
}else{
//error
}
==>unique: return false if value exist
if no such validation exist that how to make custom validator by extending Validator for this problem? Please help
exists
rule laravel.com/docs/4.2/validation#rule-exists – Kalhan.Toress