From 1b83c5b4173cd230e03fdad9bf22d5410eba278d 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: Wed, 10 Nov 2021 21:51:31 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AA=E3=82=AF=E3=82=A8=E3=82=B9=E3=83=88?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/Http/Controllers/Api/ChildrenController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/app/Http/Controllers/Api/ChildrenController.php b/backend/app/Http/Controllers/Api/ChildrenController.php index 96699310..c3ba41e3 100644 --- a/backend/app/Http/Controllers/Api/ChildrenController.php +++ b/backend/app/Http/Controllers/Api/ChildrenController.php @@ -249,14 +249,14 @@ https://kikikan.jp/c-account/forgot-password/reset/'.$token; return ['status_code' => 200, 'params' => $result]; } - public function listOfFather ($father_id) { - if (!isset($father_id)) { + public function listOfFather (Request $r) { + if (!isset($r->father_id)) { return ['status_code' => 400]; } $result = []; $child_select = ['first_name', 'last_name', 'tel']; - if (null === ($list = FatherRelation::select('child_id')->where('father_id', (int)$father_id)->orderBy('created_at', 'desc')->get())) { + if (null === ($list = FatherRelation::select('child_id')->where('father_id', (int)$r->father_id)->orderBy('created_at', 'desc')->get())) { return ['status_code' => 400]; }