sergionader
1 month ago
210
10
Laravel

Validation: Class users does not exist

Posted 1 month ago by sergionader

Hey!

I have some rules in my controller (I also tried using a form request and result is the same):

UserController

use App\User;
.....
       $rules = [
           'email'     => 'required|email|unique:users', 
           'name'      => 'required|min:8',
           'password'  => 'required'            
       ];

The table users exist as well as the field email.

Name and password rules work fine. The email rule throws this error:

ReflectionException (-1)
Class users does not exist

Any suggestions?

TIA!!!

Sergio

Please sign in or create an account to participate in this conversation.