摘要: $username = 7223; $password = "ff8080814a1353ac014a139496110049"; $pwd = md5(md5($username.$username.$password,true)); $param = [ "username"=> 7223, " 阅读全文
posted @ 2020-09-02 17:40 头皮发麻 阅读(472) 评论(1) 推荐(0) 编辑
摘要: echo "Progress : "; // 5 characters of padding at the end for ($i=0 ; $i<=100 ; $i++) { echo "\033[5D"; // Move 5 characters backward echo str_pad($i, 阅读全文
posted @ 2020-06-06 16:01 头皮发麻 阅读(793) 评论(0) 推荐(0) 编辑
摘要: var position = $(".element").offset(); position.top = position.top-60; $("html,body").animate({scrollTop:position.top}, 100); 首先获取某元素的位置 第二部 top 就是元素在 阅读全文
posted @ 2020-04-27 16:38 头皮发麻 阅读(8869) 评论(0) 推荐(2) 编辑
摘要: 动态添加的元素已经不能用常规的事件选中了jquery1.7+版本$("父元素").on("click","子元素",function(){ //do}); 阅读全文
posted @ 2020-04-13 10:34 头皮发麻 阅读(1825) 评论(0) 推荐(1) 编辑
摘要: 有一表某字段为json格式 结构如下 [{"name":"1","value":"2"},{"name":"2","value":"1"},{"name":"3","value":"1"},{"name":"4","value":"1"},{"name":&q 阅读全文
posted @ 2020-04-10 15:04 头皮发麻 阅读(3963) 评论(0) 推荐(0) 编辑
摘要: 表单进行提交时如果要进行数据库中的唯一验证 可以 $form->text('name', __('设备名')) ->creationRules('required|unique:xf_equipment_detail', ['required' => '此项不能为空','unique' => '名称 阅读全文
posted @ 2020-04-10 14:23 头皮发麻 阅读(2060) 评论(0) 推荐(0) 编辑
摘要: 模型详情为 class CheckLog extends Model { use SoftDeletes; protected $table = 'xf_check_log'; protected $dates = ['deleted_at']; // 关联设备详情表 public function 阅读全文
posted @ 2020-04-10 11:32 头皮发麻 阅读(1926) 评论(0) 推荐(0) 编辑
摘要: $grid->filter(function($filter){ // 去掉默认的id过滤器 $filter->disableIdFilter(); // 在这里添加字段过滤器 $filter->where(function ($query) { $query->join('xf_equipment 阅读全文
posted @ 2020-04-10 10:50 头皮发麻 阅读(4590) 评论(0) 推荐(0) 编辑
摘要: 控制器中 return back()->withErrors('账户/密码错误'); 视图中 @foreach($errors->all() as $error) //todo @endforeach witherrors中也可以传递数组 阅读全文
posted @ 2020-04-09 17:29 头皮发麻 阅读(934) 评论(0) 推荐(0) 编辑
摘要: $request->merge(['key' => 'value']); 阅读全文
posted @ 2020-04-09 17:27 头皮发麻 阅读(1697) 评论(0) 推荐(0) 编辑