@php $prospectos_factura = App\Cliente_Factura::with([ 'contactos' => function ($q) { $q->select('id_cliente_contacto_factura', 'id_cliente_factura', 'nombre_contacto', 'correo') ->where('delete', 1) ->orderBy('nombre_contacto', 'ASC'); } ]) ->where('prospecto', 1) ->where('active', 1) ->orderBy('nombre_empresa', 'ASC') ->get(['id_cliente_factura', 'nombre_empresa', 'rfc', 'telefono', 'descuento']); @endphp