上一页 1 2 3 4 5 6 7 8 9 ··· 13 下一页
摘要: 这是在edit方法里重写 staff是表名,username是字段名,$ids是当前数据的id try { //是否采用模型验证 if ($this->modelValidate) { $name = str_replace("\\model\\", "\\validate\\", get_clas 阅读全文
posted @ 2020-07-01 20:00 一颗糊涂淡 阅读(2087) 评论(0) 推荐(0)
摘要: 在相应的控制器中开启 class Staff extends Backend { protected $modelValidate = true; //开启验证规则 protected $modelSceneValidate = true; //开启验证场景 /** * Staff模型对象 * @v 阅读全文
posted @ 2020-07-01 19:57 一颗糊涂淡 阅读(2656) 评论(0) 推荐(0)
摘要: $list = $this->model->orderRaw('rand()')->limit(10)->select(); 阅读全文
posted @ 2020-06-18 17:49 一颗糊涂淡 阅读(496) 评论(0) 推荐(0)
摘要: /** * 生成随机订单号 * * @return void */ public static function makeOrderNo() { $yCode = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'); $orderSn = 阅读全文
posted @ 2020-05-19 15:28 一颗糊涂淡 阅读(1052) 评论(0) 推荐(0)
摘要: function getRandChar($length) { $str = null; $strPol = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz0123456789"; $max = strlen($strP 阅读全文
posted @ 2020-05-19 15:27 一颗糊涂淡 阅读(288) 评论(0) 推荐(0)
摘要: $orderInfo = model('Order')->where('create_time', '>', $start)->where('create_time', '<', ($end + 24 * 60 * 60))->where('status', '<>', 6)->order('cre 阅读全文
posted @ 2020-05-13 17:06 一颗糊涂淡 阅读(352) 评论(0) 推荐(0)
摘要: // public function change() // { // // Db::query("update `martyr` set `img_url`='http://gongyi-file.zlogic.cn/default.jpeg'"); // // Db::query("UPDATE 阅读全文
posted @ 2020-04-25 13:17 一颗糊涂淡 阅读(558) 评论(0) 推荐(0)
摘要: public function user() { return $this->belongsTo('User', 'user_id', '', 'left')->setEagerlyType(0); } 方法中用 with('user') 查询时直接调用user.userinfo来展示输出 阅读全文
posted @ 2020-04-25 13:14 一颗糊涂淡 阅读(812) 评论(0) 推荐(0)
摘要: {foreach $serviceInfo as $v} <div style="display: inline-block;margin-right: 10px;"> <input type="checkbox" value="{$v.service_item}" id="checkbox-{$v 阅读全文
posted @ 2020-03-28 16:54 一颗糊涂淡 阅读(826) 评论(0) 推荐(0)
摘要: var ajaxTimeout = $.ajax({ type: "POST", dataType: "json", url: "{:url('admin/comment/status')}", timeout: 2000, data: { 'status': status, 'id': id }, 阅读全文
posted @ 2020-03-21 10:29 一颗糊涂淡 阅读(1223) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 13 下一页