bar = $bar; $this->api = $api; } public function handle() { $this->bar->task('Synchronisiere Bundesländer', function() { $this->api->regions()->each(function($region) { \App\Region::create(['nami_id' => $region->id, 'name' => $region->name, 'is_null' => $region->name == $this->nullName]); }); }); } }