解决 laravel-admin between datetime 假如数据库是时间戳int类型无法筛选。

7-06 667 views

laravel-admin默认的between->datetime(),查询默认是datetime类型,但是假如数据库是时间戳类型就会报错,又不想改底层文件的话可以试试加自定义筛选功能...
阅读全文 0

php解析英文语句,自动分解。

6-07 691 views

参考:https://www.php.net/manual/en/function.str-split.php 最近碰到一个问题,客户的英文地址太长,超出接口api字段长度,所以需要解析下语句分解发送。 ...
阅读全文 0

记录一个laravel-excel导出表格值为0导出excel显示空的解决方法。

2-02 1,145 views

最近在使用laravel-excel导出表格的时候,发现假如字段值为0的情况下,导出的excel中直接显示为空,找到一个方法解决,如下. 在laravel-excel的config配置中...
阅读全文 0

php实现redis延时队列

11-07 1,338 views

写了一个简单的类实现 使用方法 $class = new RedisDelayQueue(); $class->execute(); <?php namespace app\common\service; class RedisDelay { ...
阅读全文 0

centos7安装python3.8

3-30 2,595 views

1.安装python 依赖 sudo yum -y install epel-release sudo yum -y update 安装完后可以 reboot 重其服务器,非必须。 2.安装gcc编译环境等等 sudo yum -y gro...
阅读全文 1

php获取包含10w个手机号的txt文件(逗号隔开)

2-25 1,559 views

txt文件格式如下 13000000000,13000000005,13000000403,13001010129,13001010688,13001010838,13001016389,13001019538,13001030005,13001042700,13001047495...
阅读全文 0

使用yum安装Go(Golang)

9-30 2,564 views

使用yum安装Go(Golang) 本来准备直接yum install golang或者yum install go, 执行命名后,发现没有这个包。于是只能先添加源,然后在使用命令行安装了。 Ins...
阅读全文 0

php使用Carbon获取2个日期之间的日期

9-03 1,984 views

<?php use Carbon\CarbonPeriod; $period = CarbonPeriod::create('2018-06-14', '2018-06-20'); // Iterate over the period fore...
阅读全文 0

dart Error: Field ‘xxx’ should be initialized because its type ‘String’ doesn’t allow null

9-01 2,249 views

最近在学dart class的构造函数时候出现 这个问题 原因是firstName没有初始化,不能为null 解决方案: 1.在String后面加个? class Person { String? firstN...
阅读全文 0

php 解决超卖的几种方案(redis锁、mysql悲观锁)

6-21 2,298 views

1.创建商品和订单表模拟商品交易操作 fa_goods商品表,stock商品库存,test_order=订单表 2.添加一个测试商品数据(商品数量为150个) 测试并发购买的方法(gol...
阅读全文 0