startOfDay(); $namiId = $settings->login()->putMembership($member->nami_id, Membership::fromArray([ 'startsAt' => $from, 'groupId' => $member->group->nami_id, 'activityId' => Activity::find($this->input('activity_id'))->nami_id, 'subactivityId' => optional(Subactivity::find($this->input('subactivity_id')))->nami_id, ])); $member->memberships()->create([ ...$this->input(), ...['nami_id' => $namiId, 'group_id' => $member->group->id, 'from' => $from], ]); $member->syncVersion(); } }