Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 858 | Revision 954 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 858 Revision 953
Zeile 335... Zeile 335...
335
                ";
335
                ";
336
                $r = DB::connection( 'old' )->select( $sql );
336
                $r = DB::connection( 'old' )->select( $sql );
337
                foreach ( $r as $row )
337
                foreach ( $r as $row )
338
                {
338
                {
339
                    $item = ShippingCountry::where( "shipping_id", "=", $row->versand_id )->where( "country_id", "=", $row->country_id )->get();
339
                    $item = ShippingCountry::where( "shipping_id", "=", $row->versand_id )->where( "country_id", "=", $row->country_id )->get();
340
                    if ( !isset( $item->id ) )
340
                    if ( !isset( $item[0]->id ) )
341
                    {
341
                    {
342
                        ShippingCountry::factory()->create( [ "shipping_id" => $row->versand_id, "country_id" => $row->country_id, ] );
342
                        ShippingCountry::factory()->create( [ "shipping_id" => $row->versand_id, "country_id" => $row->country_id, ] );
343
                    }
343
                    }
344
                }
344
                }
345
                $sql = "SELECT
345
                $sql = "SELECT
Zeile 351... Zeile 351...
351
                ";
351
                ";
352
                $r = DB::connection( 'old' )->select( $sql );
352
                $r = DB::connection( 'old' )->select( $sql );
353
                foreach ( $r as $row )
353
                foreach ( $r as $row )
354
                {
354
                {
355
                    $item = ShippingPaymentMethod::where( "shipping_id", "=", $row->versand_id )->where( "payment_method_id", "=", $row->zahlart_id )->get();
355
                    $item = ShippingPaymentMethod::where( "shipping_id", "=", $row->versand_id )->where( "payment_method_id", "=", $row->zahlart_id )->get();
356
                    if ( !isset( $item->id ) )
356
                    if ( !isset( $item[0]->id ) )
357
                    {
357
                    {
358
                        ShippingPaymentMethod::factory()->create( [ "shipping_id" => $row->versand_id, "payment_method_id" => $row->zahlart_id, ] );
358
                        ShippingPaymentMethod::factory()->create( [ "shipping_id" => $row->versand_id, "payment_method_id" => $row->zahlart_id, ] );
359
                    }
359
                    }
360
                }
360
                }
361
            }
361
            }