/** * Run the database counter seeds. * * @return void */ public function run() { Eloquent::unguard(); $this->command->info('Seeding all activities...'); $seeds = $this->getSeeds(Activity::distinct('_id')->get()); foreach ($seeds as $name => $seed) { $this->command->info('Seed: ' . $name . ' = ' . $seed); $counter = new Counter(); $counter['_id'] = $name; $counter['seq'] = $seed; $counter->save(); } $this->command->info('Seeding all entities...'); $seeds = $this->getSeeds(Entity::distinct('_id')->get()); foreach ($seeds as $name => $seed) { $this->command->info('Seed: ' . $name . ' = ' . $seed); $counter = new Counter(); $counter['_id'] = $name; $counter['seq'] = $seed; $counter->save(); } }