'directive', 'ContentType' => $order, 'Content' => json_encode($data), 'ContentId' => md5(time() . mt_rand(1, 1000000)), 'AddTime' => $msetime, 'Version' => $msetime, 'Status' => 2 ]; Db::name('publish')->save($cont); } else { $imei = is_array($imei) ? $imei : Utils::stringToArrayBy($imei); foreach ($imei as $item) { $msetime = msectime(); $cont = [ 'Type' => 'directive', 'ContentType' => $order, 'Content' => json_encode($data), 'ContentId' => md5(time() . mt_rand(1, 1000000)), 'AddTime' => $msetime, 'Version' => $msetime, 'Imei' => $item, 'Status' => 2 ]; Db::name('publish')->save($cont); } } } }