1
I am learning how to use Framwork Laravel and I came across the following error to perform an Join Ner (remembering that I already have a database with information so I am not used Migrations)
$colaborador = DB::table('colaboradores')
->join('beneficios','beneficios.colaborador_id','=','colaboradores.colaboradores_id')
->where('colaborador_id',$request->colaborador_id)
->get();
And creates the error:
SQLSTATE[23000]: Integrity Constraint Violation: 1052 Column 'colaborador_id' in Where clause is ambiguous (23000)
but if I access the database and do the command:
select * from `colaboradores` inner join `beneficios` ON beneficios.colaborador_id = colaboradores.colaborador_id
Works perfectly.
Thank you very much I managed to tidy up here
– Mp custodio