Created
July 8, 2024 17:35
-
-
Save deviationist/7a24fc88d53bcc3102ff6f63b8df319a to your computer and use it in GitHub Desktop.
How to use Symfony's ProgressIndicator-class in a Laravel Console command.
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
$indicator = new \Symfony\Component\Console\Helper\ProgressIndicator($this->output); | |
$indicator->start('Starting the process...'); | |
foreach (range(0, 10) as $i) { | |
usleep(5 * 10000); | |
$indicator->advance(); | |
} | |
$indicator->finish('Process complete!'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment