From c7eba9d7e8766cbe54e4aabbf71a10b55dda154e Mon Sep 17 00:00:00 2001 From: Philipp Lang Date: Sun, 1 May 2022 21:08:16 +0200 Subject: [PATCH] update nami group --- app/Member/MemberRequest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Member/MemberRequest.php b/app/Member/MemberRequest.php index e68a82b3..1455b8d6 100644 --- a/app/Member/MemberRequest.php +++ b/app/Member/MemberRequest.php @@ -3,6 +3,7 @@ namespace App\Member; use App\Activity; +use App\Group; use App\Setting\NamiSettings; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Support\Str; @@ -61,7 +62,7 @@ class MemberRequest extends FormRequest public function persistCreate(NamiSettings $settings): void { - $this->merge(['group_id' => $settings->default_group_id]); + $this->merge(['group_id' => Group::where('nami_id', $settings->default_group_id)->firstOrFail()->id]); $member = Member::create($this->input()); if ($this->input('has_nami')) { CreateJob::dispatch($member);