<?php
 namespace App\Console\Commands; use Illuminate\Console\Command; use Illuminate\Foundation\Inspiring; use TechOnline\Laravel\Dao\ModelUtil; use TechSoft\Laravel\Config\ConfigUtil; use TechSoft\Laravel\Data\DataUtil; class MigrateJob extends Command { protected $signature = 'MigrateJob'; protected $description = 'Display an inspiring quote'; public function handle() { foreach (ModelUtil::all('data') as $item) { ModelUtil::update('data', $item['id'], [ 'driver' => ConfigUtil::getWithEnv('uploadDriver'), 'domain' => ConfigUtil::getWithEnv('uploadDriverDomain'), ]); } foreach (ModelUtil::all('module_big_wheel_activity') as $item) { ModelUtil::update('module_big_wheel_activity', $item['id'], [ 'background' => DataUtil::fix($item['background']), 'backgroundMusic' => DataUtil::fix($item['backgroundMusic']), 'shareImage' => DataUtil::fix($item['shareImage']), ]); } foreach (ModelUtil::all('module_prize_pool') as $item) { ModelUtil::update('module_prize_pool', $item['id'], [ 'cover' => DataUtil::fix($item['cover']), ]); } foreach (ModelUtil::all('module_prize_pool_drawn') as $item) { ModelUtil::update('module_prize_pool_drawn', $item['id'], [ 'cover' => DataUtil::fix($item['cover']), ]); } foreach (ModelUtil::all('module_prize_pool_setting') as $item) { ModelUtil::update('module_prize_pool_setting', $item['id'], [ 'emptyCover' => DataUtil::fix($item['emptyCover']), ]); } } } 