search([])->each(function (NamiMember $member) { try { $localMember = app(PullMemberAction::class)->handle($member->groupId, $member->id); } catch (Skippable $e) { return; } app(PullMembershipsAction::class)->handle($localMember); app(PullCoursesAction::class)->handle($localMember); }); } public function restore(): void { DB::table('payments')->delete(); DB::table('course_members')->delete(); DB::table('memberships')->delete(); DB::table('members')->delete(); } public function asCommand(Command $command): int { $this->handle(app(NamiSettings::class)->login()); return 0; } }