Skip to content

Commit ba6f0f0

Browse files
Add progress bar to rebuild URI cache command (#414)
1 parent de0f3e2 commit ba6f0f0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Console/Commands/RebuildUriCache.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public function handle()
5757

5858
Runway::allResources()
5959
->each(function (Resource $resource) {
60+
$this->newLine(2);
6061
$this->info("Building {$resource->name()} URIs");
6162

6263
if (! $resource->hasRouting()) {
@@ -65,9 +66,7 @@ public function handle()
6566
return;
6667
}
6768

68-
$resource->model()->all()->each(function ($model) use ($resource) {
69-
$this->line("{$resource->name()}: {$model->{$resource->primaryKey()}}");
70-
69+
$this->withProgressBar($resource->model()->all(), function ($model) use ($resource) {
7170
$uri = (new Parser())
7271
->parse($resource->route(), $model->toAugmentedArray())
7372
->__toString();

0 commit comments

Comments
 (0)