public function handle() { $datas = Model::all(); $bar = $this->output->createProgressBar($datas->count()); $datas->each(function ($data) use ($bar) { try { // do something } catch (Exception $e) { $this->error('Error'); } $bar->advance(); }); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter