info('We are going to update your `textures` table. Please wait...'); $textures = Texture::all(); $bar = $this->output->createProgressBar($textures->count()); $textures->each(function ($texture) use ($bar) { $texture->likes = $texture->likers->count(); $texture->save(); $bar->advance(); }); $bar->finish(); $this->info("\nCongratulations! Table was updated successfully."); } }