Last active
July 3, 2017 12:01
-
-
Save sirawitpra/205aec8990c461abdce136995db6537f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// cool previous code | |
public function handler() | |
{ | |
$bar = Partyline::getOutput(); | |
Search::onUpdateStart(function($totalEntries) use (&$bar) { | |
Partyline::line('Updating the index...'); | |
$bar = $bar->createProgressBar($totalEntries); | |
}) | |
->onEachEntryCompleted(function() use (&$bar) { | |
$bar->advance(); | |
}) | |
->onUpdateEnd(function () use (&$bar) { | |
Partyline::line('All done!'); | |
$bar->finish(); | |
}) | |
->update(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment