$ingreso=DB::table('INGRESO as i')
->join('PERSONA as p','i.ID_PER','=','p.ID_PER')
->join('DETALLE_INGRESO as di','i.ID_ING','=','di.ID_ING')
->select('i.ID_ING','i.FECHA_HORA','p.nombre','i.TIP_COMP','i.SERIE_COMP','i.NUM_COMP','i.impuesto','i.estado',DB::raw('sum(di.cantidad*PRECIO_COMPRA)as total'))
->where('i.ID_ING','=',$id)
->first();
$detalles=DB::table('DETALLE_INGRESO as d')
->join('Articulo as a','d.ID_ARTI','=','a.ID_ARTI')
->select('a.nombre as Articulo','d.cantidad','d.PRECIO_COMPRA','d.PRECIO_VENTA')
->where('d.ID_ING','=',$id)
->get();
return view("compras.ingreso.show",["ingreso"=>$ingreso,"detalles"=>$detalles]);
My problem is that it only reads the variable "income".
{{Form::Open(array('action'=>array('IngresoController@show',$ing->ID_ING,$detalle->ID_ING)))}}