Commit list User
This commit is contained in:
parent
9c0eea5bb1
commit
c8f7617576
@ -92,6 +92,18 @@ public function listUser(){
|
||||
]);
|
||||
}
|
||||
|
||||
public function listUserHabilitados(){
|
||||
$users = User::whereNotNull("name")->where("estado",true)->get();
|
||||
foreach ($users as $user) {
|
||||
$user->rol=User::find($user->id)->roles[0]->name;
|
||||
}
|
||||
return response([
|
||||
"status" => 1,
|
||||
"msg" => "!Lista de usuarios no nulos y habilitados",
|
||||
"data" => $users,
|
||||
]);
|
||||
}
|
||||
|
||||
public function logout()
|
||||
{
|
||||
auth()->user()->tokens()->delete();
|
||||
|
@ -38,7 +38,8 @@
|
||||
|
||||
|
||||
//CAMBIAR ESTO
|
||||
Route::get('user', [UserController::class, 'listUser']);
|
||||
//Route::get('user', [UserController::class, 'listUser']);
|
||||
Route::get('user', [UserController::class, 'listUserHabilitados']);
|
||||
|
||||
/* Route::get('plan/pdf/{id}', [PlanController::class, 'pdfPlan'])->where('id', '[0-9]+'); */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user