Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

182
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda