Add estado->users (habilitar o deshabilitar)
This commit is contained in:
parent
7c859accc0
commit
50d6108068
@ -24,6 +24,7 @@ public function register(Request $request)
|
||||
$user->lastname = "null";
|
||||
$user->email = $request->email;
|
||||
$user->password = "null";
|
||||
$user->estado = true;
|
||||
$user->save();
|
||||
$user->roles()->attach($request->rol);
|
||||
return response()->json([
|
||||
|
@ -19,6 +19,7 @@ public function up()
|
||||
$table->string('lastname');
|
||||
$table->string('email')->unique();
|
||||
$table->string('password');
|
||||
$table->boolean('estado');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,7 @@ public function run()
|
||||
"lastname"=>"Apoyo",
|
||||
"email"=>"admin@unsa.edu.pe",
|
||||
"password"=>Hash::make("123456"),
|
||||
"estado"=>true,
|
||||
]);
|
||||
\App\Models\User::find(1)->roles()->attach(1);
|
||||
|
||||
@ -37,6 +38,7 @@ public function run()
|
||||
"lastname"=>"Arroyo",
|
||||
"email"=>"aarroyoh@unsa.edu.pe",
|
||||
"password"=>Hash::make("luisangel"),
|
||||
"estado"=>true,
|
||||
]);
|
||||
\App\Models\User::find(2)->roles()->attach(1);
|
||||
|
||||
@ -45,6 +47,7 @@ public function run()
|
||||
"lastname"=>"Araoz",
|
||||
"email"=>"faraoz@unsa.edu.pe",
|
||||
"password"=>Hash::make("123456"),
|
||||
"estado"=>true,
|
||||
]);
|
||||
\App\Models\User::find(3)->roles()->attach(1);
|
||||
|
||||
@ -53,6 +56,7 @@ public function run()
|
||||
"lastname"=>"Acuña",
|
||||
"email"=>"jacuna@unsa.edu.pe",
|
||||
"password"=>Hash::make("123456"),
|
||||
"estado"=>true,
|
||||
]);
|
||||
\App\Models\User::find(4)->roles()->attach(1);
|
||||
|
||||
@ -61,6 +65,7 @@ public function run()
|
||||
"lastname"=>"Gonzales",
|
||||
"email"=>"cgonzalesmo@unsa.edu.pe",
|
||||
"password"=>Hash::make("123456"),
|
||||
"estado"=>true,
|
||||
]);
|
||||
\App\Models\User::find(5)->roles()->attach(1);
|
||||
|
||||
@ -70,6 +75,7 @@ public function run()
|
||||
"lastname"=>"Sullca",
|
||||
"email"=>"csullcap@unsa.edu.pe",
|
||||
"password"=>Hash::make("123456"),
|
||||
"estado"=>true,
|
||||
]);
|
||||
\App\Models\User::find(6)->roles()->attach(1);
|
||||
|
||||
@ -78,6 +84,7 @@ public function run()
|
||||
"lastname"=>"Guillen",
|
||||
"email"=>"bguillenn@unsa.edu.pe",
|
||||
"password"=>Hash::make("123456"),
|
||||
"estado"=>true,
|
||||
]);
|
||||
\App\Models\User::find(7)->roles()->attach(1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user