Correccion registrar usuario

This commit is contained in:
cgonzalesmo 2022-10-23 23:01:17 -05:00
parent 8d135b3e8e
commit 7a4c550bc5

View File

@ -15,7 +15,7 @@ public function register(Request $request)
{ {
$request->validate([ $request->validate([
'email' => 'required|email|unique:users', 'email' => 'required|email|unique:users',
'rol'=> 'required|numeric|size:2' 'rol'=> 'required|numeric|min:1|max:2'
]); ]);
$userAuth = auth()->user()->roles[0]->name; $userAuth = auth()->user()->roles[0]->name;
if ($userAuth == "Admin") { if ($userAuth == "Admin") {