I have a question. how do I define the alias for columns with the same name ????. In particular I wish to consult my Database with records related to laravel in the following way
$proveedor =DB::table('proveedors')
->join('pais', 'proveedors.id_pais', '=', 'pais.id_pais')
->join('departamentos', 'proveedors.id_departamento', '=',
'departamentos.id_departamento') ->select('nombre','representante','cargo','direccion','telefono','pais.nombre','departamentos.nombre', 'email','notas')
->where('id_proveedor', '=', $id)
->get();
But it returns an error because of the ambiguity in the column names.