Skip to content

Instantly share code, notes, and snippets.

View sgpopov's full-sized avatar

Svilen Popov sgpopov

View GitHub Profile
@sgpopov
sgpopov / ProgressBarCallback.php
Created May 9, 2019 15:48 — forked from jeffochoa/ProgressBarCallback.php
ProgressBar callback trait for Laravel commands
<?php
namespace App\commands;
trait ProgressionBarOutput
{
public function runProcess(\Countable $countable, callable $callback)
{
$bar = $this->output->createProgressBar(count($countable));
$bar->start();