定制 ms48/laravel-console-progress-bar 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ms48/laravel-console-progress-bar

最新稳定版本:v1.0.4

Composer 安装命令:

composer require ms48/laravel-console-progress-bar

包简介

A simple console progress bar for laravel 5

README 文档

README

Laravel Console Progress Bar is a Console based progress bar library providing an easier and expressive way to show your current progresses.

Latest Stable Version License

Requirements

  • PHP >=5.6

Installation

Composer is the recommended way to install this package.

composer require ms48/laravel-console-progress-bar

Once composer has installed the package add this line of code to the providers array located in your config/app.php file:

Ms48\LaravelConsoleProgressBar\ConsoleProgressBarProvider::class,

Add this line to the aliases array:

'ConsoleProgressBar' => Ms48\LaravelConsoleProgressBar\Facades\ConsoleProgressBar::class,

Code Examples

// calling the Facades
use ConsoleProgressBar;

// calling the progressbar
$limit = 20;
$total = Model::get()->count(); //get total recodes

//looping through the result array and show the progress bar
foreach($resultArr as $row)
{
  //some codes
  
  ConsoleProgressBar::showProgress($limit, $total);
}

Sample output

[=======>                       ] 24%  1700/7203 remaining: 45sec elapsed: 14sec

You can optionally add the size of the progress bar (default is 30)

ConsoleProgressBar::showProgress($limit, $total, $size);

License

Laravel Console Progress Bar is licensed under the MIT License.

Copyright 2017 Shanuka Dilshan

统计信息

  • 总下载量: 25.69k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-26