上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 25 下一页
摘要: laravel chunk处理块结果集 简介 如果你需要处理成千上百条数据库记录,可以考虑使用 chunk 方法,该方法一次获取结果集的一小块,然后传递每一小块数 据到闭包函数进行处理 优点: ​ 使用 方法能够在处理大量数据集合时能够有效减少内存消耗 代码 阅读全文
posted @ 2019-12-07 10:49 pine007 阅读(1050) 评论(0) 推荐(0)
摘要: laravel 查询 单条查询 所有查询 聚合函数 判断记录是否存在 阅读全文
posted @ 2019-12-06 18:16 pine007 阅读(608) 评论(0) 推荐(0)
摘要: laravel where字句 值 区间 null 数组 字段 参数分组 注入原生 where 子句 动态的 Where 字段 阅读全文
posted @ 2019-12-06 17:01 pine007 阅读(5854) 评论(0) 推荐(0)
摘要: laravel 数据库操作 DB 1、添加 insert([]):可以同时添加一条或多条,返回值是布尔类型 insertGetId([]):只能添加一条数据,返回自增的id 2、更新 update([]):更新数据 increment('age'); 每次+1,age为字段名 increment(' 阅读全文
posted @ 2019-12-06 15:27 pine007 阅读(590) 评论(0) 推荐(0)
摘要: laravel 上传图片 图片表 代码 请求 | 参数名 | 必选 | 类型 | 说明 | | | | | | | picture | 是 | file | 图片文件 | | picture_category | 否 | int | 所属分类 | 阅读全文
posted @ 2019-12-05 16:40 pine007 阅读(321) 评论(0) 推荐(0)
摘要: laravel 分享功能 扩展包: chencha/share 简介: 常见的分享是一个固定写死的链接,点击后跳转对应网站的分享页面,laravel 有专门的分享扩展包 chencha/share,能更加便捷的生成分享链接,主要针对国外的网站如:facebook、twitter、pinterest等 阅读全文
posted @ 2019-12-05 16:30 pine007 阅读(475) 评论(0) 推荐(0)
摘要: 拖拽排序 文件 "拖拽排序.zip" 目录 效果 html 打印的data php 阅读全文
posted @ 2019-12-05 15:34 pine007 阅读(195) 评论(0) 推荐(0)
摘要: ``` //清空各种缓存 public function clear(){ Artisan::call('cache:clear'); Artisan::call('config:clear'); Artisan::call('route:clear'); Artisan::call('view:clear'); Artisan::call('clear-compiled'); Art... 阅读全文
posted @ 2019-10-30 18:28 pine007 阅读(5544) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-10-30 18:25 pine007 阅读(2327) 评论(0) 推荐(0)
摘要: ```php /** * 生成单号 * @param null $model 模型 * @param string $key 缓存key * @param string $prefix 单号前缀 * @param string $field 单号字段 * @return bool|string */ public static function GetRef($model = null,$key 阅读全文
posted @ 2019-09-29 16:55 pine007 阅读(182) 评论(0) 推荐(0)
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 25 下一页