samedi 10 octobre 2015

Difference between Validator facade Vs Validate() method in Laravel 5.1

For Laravel 5.1 we know we can do validation by this way:

validation using validate() method.

$this->validate( $request, $rules);

Validation usig Validator Fasad

$validator = Validator::make($request->all(), $rules);
if($validator->fails())
{
return redirect()->back()->withInput($request->except('password'))->withErrors($validator);
    }

Does redirect back with errors with input required if I use validate() method ??



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire