api = $api; } public function handle(Api $api): void { $this->api->nationalities()->each(function ($nationality) { Nationality::create(['nami_id' => $nationality->id, 'name' => $nationality->name]); }); } }