上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 19 下一页
摘要: array_filter() 重点在于过滤(而不是新增)某个元素,当你处理到一个元素时,返回过滤后的数组 array_map() 重点在于遍历一个数组或多个数组的元素,返回一个新的数组 array_walk() 重点在于遍历数组进行某种操作 array_filter() 和 array_walk() 阅读全文
posted @ 2021-01-15 15:56 caibaotimes 阅读(1854) 评论(0) 推荐(0) 编辑
摘要: 安装的模块依赖和composer.json中版本冲突冲突: "require": { "php": "^7.3|^8.0", "guzzlehttp/guzzle": "^6.5.5|^7.0.1", 加入包 . . . composer update 阅读全文
posted @ 2021-01-13 15:10 caibaotimes 阅读(870) 评论(0) 推荐(0) 编辑
摘要: 出现bad interpreter:No such file or directory的原因是Linux与Windows之间文件格式的问题。如果shell文件是在Windows下编写的,就会出现这种错误。因为Windows的换行方式与Unix不一样,但是在VI下面如果不Set一下又完全看不出来。 解 阅读全文
posted @ 2021-01-13 15:02 caibaotimes 阅读(1512) 评论(0) 推荐(0) 编辑
摘要: 1. ScaffoldController.php 2. scaffold.blade.php 3. ModelCreator.php 4. ControllerCreator.php 5. FormCreator.php 6. GridCreator.php 修改列表页数据库字段翻译 第一种: p 阅读全文
posted @ 2021-01-06 16:10 caibaotimes 阅读(3467) 评论(0) 推荐(0) 编辑
摘要: laravel8.x Eloquent是独立的模块,我们也可以在自己的项目里通过composer来使用Eloquent。 Illuminate Database The Illuminate Database component is a full database toolkit for PHP, 阅读全文
posted @ 2021-01-06 16:09 caibaotimes 阅读(649) 评论(1) 推荐(1) 编辑
摘要: mysql中的条件语句主要有if 和case when。 IF(expr1,expr2,expr3):如果第一个条件为True,则返回第二个参数,否则返回第三个 select if(author='Felix', 'yes', 'no') as AU from test; 用case when实现i 阅读全文
posted @ 2021-01-02 10:25 caibaotimes 阅读(527) 评论(0) 推荐(0) 编辑
摘要: 一、有主键去重 a、单字段重复 查询重复记录(一条) select aid from ab group by aid having count(*)>1 查询重复记录(全部) select * from ab t where t.aid in(select aid from ab group by 阅读全文
posted @ 2020-12-28 23:05 caibaotimes 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 问题还原: 一般的写法:DB::table('users')->select('id','username')->get(); 这样写是一点问题没有的。 **加别名的写法:**DB::table('users as table1')->select('id')->get(); 这样写也不会产生错误 阅读全文
posted @ 2020-12-28 22:18 caibaotimes 阅读(418) 评论(0) 推荐(0) 编辑
摘要: 常用命令 require命令 我们还可以使用require命令快速的安装一个依赖而不需要手动在composer.json里添加依赖信息。 $ composer require monolog/monolog Composer会先找到合适的版本,然后更新composer.json文件,在require 阅读全文
posted @ 2020-12-27 23:15 caibaotimes 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 表单里没有这个参数,为什么总是带着这个 s laravel 的 url 重写的 nginx 配置,使用这种方式 location / { try_files $uri $uri/ /index.php?$query_string; } 不要使用类似 tp 的这种 location / { if (! 阅读全文
posted @ 2020-12-27 23:04 caibaotimes 阅读(199) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 19 下一页