Correccion registrar usuario
This commit is contained in:
parent
8d135b3e8e
commit
7a4c550bc5
@ -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") {
|
||||||
|
Loading…
Reference in New Issue
Block a user