Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (var i = 0 ; i<tfactura.length ; i++){
- var nombre2 = tfactura[i];
- var cantidad = tcantidad[i];
- var precio = tprecio[i];
- $.ajax({
- type: "GET",
- url: "factura1",
- data: {nombre2: nombre2, cantidad: cantidad, precio: precio},
- dataType: 'json'
- });
- }
- public function factura1(Request $request){
- $precio = $request->precio;
- $nombre = $request->nombre2;
- $cantidad = $request->cantidad;
- $request->session()->push('nombres', $nombre);
- $request->session()->push('precios2', $precio);
- $request->session()->push('cantidades', $cantidad);
- }
- public function borrarSessiones(){
- session()->forget(['cantidades', 'precios2','nombres']);
- }
- function borrarS(){
- $.ajax({
- type: "GET",
- url: "borrarSessiones",
- dataType: 'json'
- });
- function recuperarD2(){
- $.ajax({
- type: "GET",
- url: "recuperarD2",
- dataType: 'json',
- success : function (response){
- for ( var i=0; i<response.length; i++){
- tfactura[i] = response[i];
- }
- recuperarD3();
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement