From bd56414411174d984311cd0e51abcfd603d00857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=86=E3=82=AF=E3=83=8B=E3=82=AB=E3=83=AB=E8=AB=8F?= =?UTF-8?q?=E8=A8=AA=E5=AD=90?= Date: Mon, 15 Nov 2021 12:42:00 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=81=E3=82=AD=E3=83=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Api/MeetingApprovalsController.php | 4 ++-- .../Http/Controllers/Api/MeetingsController.php | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/backend/app/Http/Controllers/Api/MeetingApprovalsController.php b/backend/app/Http/Controllers/Api/MeetingApprovalsController.php index 5f6757cb..9c4a0ff0 100644 --- a/backend/app/Http/Controllers/Api/MeetingApprovalsController.php +++ b/backend/app/Http/Controllers/Api/MeetingApprovalsController.php @@ -127,7 +127,7 @@ class MeetingApprovalsController extends Controller { } foreach ($params as $p) { - if (null === ($p->child_id = Child::select($child_select)->where('id', (int)$p->child_id)->first())) { + if (null === ($p->child = Child::select($child_select)->where('id', (int)$p->child_id)->first())) { return ['status_code' => 400]; } } @@ -149,7 +149,7 @@ class MeetingApprovalsController extends Controller { } foreach ($params as $p) { - if (null === ($p->child_id = Child::select($child_select)->where('id', (int)$p->child_id)->first())) { + if (null === ($p->child = Child::select($child_select)->where('id', (int)$p->child_id)->first())) { return ['status_code' => 400]; } } diff --git a/backend/app/Http/Controllers/Api/MeetingsController.php b/backend/app/Http/Controllers/Api/MeetingsController.php index 3ada16d1..8d5a69a0 100644 --- a/backend/app/Http/Controllers/Api/MeetingsController.php +++ b/backend/app/Http/Controllers/Api/MeetingsController.php @@ -236,14 +236,14 @@ class MeetingsController extends Controller { return ['status_code' => 400]; } foreach ($list as $i => $l) { - if (null !== ($l->approval = MeetingApprovals::select($meeting_approvals_select)->whereNotNull('approval_at')->where('meeting_id', (int)$l->id)->get())) { - foreach ($l->approval as $ii => $ll) { + if (null !== ($l->approvals = MeetingApprovals::select($meeting_approvals_select)->whereNotNull('approval_at')->where('meeting_id', (int)$l->id)->get())) { + foreach ($l->approvals as $ii => $ll) { if (null === ($ll->child = Child::select($child_select)->where('id', (int)$ll->child_id)->first())) { $ll->child = []; } - } - $result[] = $l; + $result[] = $l; + } } } @@ -266,14 +266,14 @@ class MeetingsController extends Controller { } foreach ($list as $i => $l) { - if (null !== ($l->approval = MeetingApprovals::select($meeting_approvals_select)->whereNull('approval_at')->where('meeting_id', (int)$l->id)->get())) { - foreach ($l->approval as $ii => $ll) { + if (null !== ($l->approvals = MeetingApprovals::select($meeting_approvals_select)->whereNull('approval_at')->where('meeting_id', (int)$l->id)->get())) { + foreach ($l->approvals as $ii => $ll) { if (null === ($ll->child = Child::select($child_select)->where('id', (int)$ll->child_id)->first())) { $ll->child = []; } - } - $result[] = $l; + $result[] = $l; + } } }