Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

178
Vistas
I want to update Value but supervisor id update not properly it's update only first value where get employee_id

here I get supervisor id enter image description here

I want to update all supervisor IDs where employee_id and employee are equal. When i update this value it's just an update of the single value for WorkingHierarchys Table. I try too much but I can't resolve this. enter image description here here update only one value for employee

here updated code

                    foreach($supervisors as $key=>$supervisor){
                        $work_hiechye['supervisor_id']=$supervisor;
                        $work_hiechye['employee_id']=$employee;
                        WorkingHierarchy::where('employee_id',$employee)->update($work_hiechye);


                    }
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You will need to update the employee_id where the superviser_id is equal with $superviser and it will be something like this. I don't know your whole context, but what are you trying to do is not gone work.

foreach($supervisors as $supervisor) {
    WorkingHierarchy::where([ 'superviser_id' => $supervisor ])->update([ 'employee_id' => $employee ]);
}
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda