Skip to content

Instantly share code, notes, and snippets.

View loekwetzels's full-sized avatar
🚀

Loek Wetzels loekwetzels

🚀
  • secretninjas.nl / eightbits.nl / develop-s.nl
  • Maastricht, Netherlands
  • 22:08 (UTC +02:00)
View GitHub Profile
@loekwetzels
loekwetzels / laravel_update_large_data.php
Last active March 22, 2023 12:41
How to update large data in Laravel
<?php
// source: https://42coders.com/how-to-update-large-data-in-laravel
$query = App\Models\User::where('active', true);
$count = $query->count();
/** @var \Symfony\Component\Console\Helper\ProgressBar */
$this->bar = $this->output->createProgressBar($count);