api = $api; } public function handle(): void { $group = $this->api->groups()->first()->id; $this->api->feesOf($group)->each(function ($fee) { Fee::create(['nami_id' => $fee->id, 'name' => $fee->name]) ->subscriptions()->create([ 'name' => $fee->name, ]); }); } public function restore(): void { DB::table('subscriptions')->delete(); DB::table('fees')->delete(); } }