tobya/every
最新稳定版本:v0.4
Composer 安装命令:
composer require tobya/every
包简介
Execute a closure every count times the function is called
README 文档
README
A very simple Laravel package that will execute a closure every x times it is called.
Installation
Install with composer
composer require tobya/every
Usage
use in a loop to execute every x times
foreach( $BigList as $item){
if (DoACheck()){
DoSomethign();
}
\Tobya\Every\Every::Every(20, function(){
echo 'checked 20';
});
}
if you just want to echo you can simply use the echo function
foreach( $BigList as $item){
if (DoACheck()){
DoSomethign();
}
\Tobya\Every\Every::Echo(20, 'checked 20');
}
统计信息
- 总下载量: 3.39k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-09-14