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]; }