摘要:
public function RandomMoney($money, $num) { $arr = array(); $total_money = 0; $this_money = $money; $total_num = $num; for ($i = 0; $i < $num; $i++) { 阅读全文
摘要:
//model 中public function children() { return $this->hasMany(get_class($this), 'pid', 'id') ->with('children'); } public static function list($limit) { 阅读全文
摘要:
Job允许脱离队列 只需在控制器中调用 $this->dispatchNow() 即可。 public function approve(Article $article) { $this->dispatchNow(new ApproveArticle($article));} 获取数据的方法 如果 阅读全文
摘要:
/** * 去除空格 * @param $value * @return mixed */ function strReplaceTN($value) { if (!$value) { return $value; } // u模式符表示 字符串被当成 UTF-8处理 $value = preg_r 阅读全文
摘要:
trait SceneValidator <?php namespace App\Http\Requests; use Illuminate\Contracts\Validation\{Factory, Validator}; trait SceneValidator { protected $sc 阅读全文
摘要:
class RedPacket { public $bonus = []; //红包 public $bonusNum; //红包个数 public $bonusMoney; //红包总金额 public $moneySingleMax; //单个红包最大限制 public $moneySingle 阅读全文
摘要:
//获取性别public static function idNoToSex($id_no, $type = 1) { if (empty($id_no)) { return 0; } $sex_int = (int)substr($id_no, 16, 1); if ($type == 1) { 阅读全文
摘要:
public static function jieExcelDate($date_str) { if (empty($date_str)) { return ""; } $data_type3 = gettype($date_str); if ($data_type3 == 'string') { 阅读全文
摘要:
function getLastSql() { DB::listen(function ($sql) { foreach ($sql->bindings as $i => $binding) { if ($binding instanceof \DateTime) { $sql->bindings[ 阅读全文
摘要:
public function timingApplyBorrow() { //截断表数据 YunUserBorrowList::truncate(); YunUserEntry::select('id', 'name', 'company_id', 'id_no', 'id_no')->chunk 阅读全文