dimanche 22 mars 2020

How to check for validation error in laravel

I want to check if any error accrue while validating data in laravel

code:

$user = $request->validate([
            'name' => 'required',
            'email' => 'required | email',
            'password' => 'required'
        ]);

any one know how to do that ? I've try to check

if ($user) 

but that does not seems to work !!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire