| Package Data | |
|---|---|
| Maintainer Username: | rahul900day |
| Maintainer Contact: | rahul900day@gmail.com (Rahul Dey) |
| Package Create Date: | 2021-08-24 |
| Package Last Update: | 2025-03-18 |
| Home Page: | |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-23 15:06:45 |
| Package Statistics | |
|---|---|
| Total Downloads: | 108,974 |
| Monthly Downloads: | 4,001 |
| Daily Downloads: | 144 |
| Total Stars: | 76 |
| Total Watchers: | 2 |
| Total Forks: | 3 |
| Total Open Issues: | 0 |
Laravel Console Spinner was created by Rahul Dey. It is just a custom Progress Bar inspired by icanhazstring/symfony-console-spinner.
Requires PHP 7.3+
Via Composer:
composer require rahul900day/laravel-console-spinner
You can publish the config file with:
php artisan vendor:publish --tag=console-spinner-config
This is the contents of the published config file:
return [
'chars' => ['⠏', '⠛', '⠹', '⢸', '⣰', '⣤', '⣆', '⡇'],
];
class SimpleLaravelCommand extends Command
{
/**
* Execute the console command.
*
* @return void
*/
public function handle()
{
$spinner = $this->spinner($users->count());
$spinner->setMessage('Loading...');
$spinner->start();
foreach ($users as $user) {
// Do your stuff...
$spinner->advance();
}
$spinner->finish();
}
}
The $spinner is compatible with Symfony ProgressBar, so you can run any method of this class.
Or you can also use with withSpinner method by giving an iterable.
$this->withSpinner(User::all(), function($user) {
// Do your stuff with $user
}, 'Loading...');
This package is released under the MIT license.