foreach ($xml->product as $value) {
if (empty($value->image)) continue;
Product::where('product_number', $value->index)->update([
'image' => file_put_contents($value->index.".jpg", file_get_contents($value->image))
]);
}
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:FZy+6DGJuw6LmMvY6xn15Z9u0s3f/Fu4/n75cA=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug
DB_CONNECTION=rme
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=sklep_rme_me_ae
DB_USERNAME=root
DB_PASSWORD=
DB_CONNECTION=qwer
DB_HOST2=94.237.81.63
DB_PORT2=3306
DB_DATABASE2=aaa
DB_USERNAME2=aaaaa
DB_PASSWORD2=aaaaaaaaaa
BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database
SESSION_DRIVER=file
SESSION_LIFETIME=120
MEMCACHED_HOST=127.0.0.1
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"