Jens Segers on Jun 13 2015

CLI progress bars in Laravel

Laravel 5.1 was released this week, and it came with a lot of interesting goodies. One of those goodies was the addition of Symfony's progress bar support for console commands. I have a lot of commands that I use to perform periodic tasks, and this will certainly make the output a lot nicer!


foreach ($users as $user) {



Which generates this output:

> php artisan my:command
17/50 [=========>------------------]  34%

For more information about this feature, check the original Laravel documentation.


wouterds 4 years ago

Nice, going to try this!

Rafael Santos 4 years ago

I know this isn't related, but you seem to know a lot about Laravel. Is there a way to use Artisan or something similar in a framework agnostic way?

datashaman 3 years ago

Rafael, this was posted recently to github. I have not tried it, but it purports to be what you want.