Skip to content
Advertisement

Using a Progress Bar while Seeding a database in Laravel

I have to seed quite a lot of data into a database and I want to be able to show the user a progress bar while this happens. I know this is documented:

but I’m having problems including it in my seeder.

JavaScript

or

JavaScript

from https://mattstauffer.co/blog/advanced-input-output-with-artisan-commands-tables-and-progress-bars-in-laravel-5.1

Any ideas?

Advertisement

Answer

You can get access to output through $this->command->getOutput()

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement