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