From 55fd4315ce1d462d4c2e0341fd494b34529361ca Mon Sep 17 00:00:00 2001 From: philipp lang Date: Sun, 22 Aug 2021 21:40:27 +0200 Subject: [PATCH] Fixed: Store subactivity for member --- app/Member/CreateJob.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/Member/CreateJob.php b/app/Member/CreateJob.php index ffed4031..9b31d73a 100644 --- a/app/Member/CreateJob.php +++ b/app/Member/CreateJob.php @@ -2,15 +2,16 @@ namespace App\Member; +use App\Activity; +use App\Confession; +use App\Group; +use App\Subactivity; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use Zoomyboy\LaravelNami\Nami; -use App\Confession; -use App\Group; -use App\Activity; class CreateJob implements ShouldQueue { @@ -77,6 +78,9 @@ class CreateJob implements ShouldQueue foreach ($memberships as $membership) { $this->member->memberships()->create([ 'activity_id' => Activity::nami($membership['activity_id'])->id, + 'subactivity_id' => $membership['subactivity_id'] + ? Subactivity::nami($membership['subactivity_id'])->id + : null, 'group_id' => Group::nami($membership['group_id'])->id, 'nami_id' => $membership['id'], 'created_at' => $membership['starts_at'],