fecha_inicio = $fecha_inicio; $this->fecha_final = $fecha_final; } public function collection() { return Venta::select( 'codigo', 'pago_efectivo', 'pago_tarjeta_debito', 'pago_tarjeta_credito', 'pago_vales', 'precio_venta', 'estado_venta_id as tipo_venta', 'user_id as usuario', )->get(); } public function view(): View { return view('export.reporteExport',[ 'ventas' => Venta::whereBetween('created_at',[$this->fecha_inicio,$this->fecha_final])->get(), ]); } }