ms48/laravel-console-progress-bar

A simple console progress bar for laravel 5
26,879 6
Install
composer require ms48/laravel-console-progress-bar
Latest Version:v1.0.4
PHP:>=5.6.4
License:MIT
Last Updated:Jul 17, 2017
Links: GitHub  ·  Packagist
Maintainer: ms48

Laravel Console Progress Bar

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

Related Packages

emir/laravel-webartisan

Web artisan allows to run artisan console commands using a browser

874 56
recca0120/terminal

run laravel artisan command in web application

421,969 877
darsain/laravel-console

Browser console for Laravel Framework.

57,247 167
dusterio/laravel-verbose

Package that adds verbosity to Laravel/Lumen built-in console commands

6,292 6
recca0120/laravel-bridge

use laravel eloquent, view, pagination anywhere

466 31