I have a problem with the query I'm doing, when joining two tables with a join I do not see a column because they have the same name. I tried to use a select as I normally do in sql but it still does not appear.
$user = DB::table('app_registro_usuario')
->join('app_alumno_curso', 'app_alumno_curso.id_alumno', '=', 'app_registro_usuario.id')
->join('app_curso', 'app_alumno_curso.id_curso', '=', 'app_curso.id')
->join('app_sexo', 'app_registro_usuario.id_sexo', '=', 'app_sexo.id')
->where('id_tipo_usuario', 1)
->where('app_registro_usuario.id', $id)
->where('id_estalecimiento', $id_establecimiento)
->first();
The name of the column that is in two tables that I connect is "name".