リクエスト化

このコミットが含まれているのは:
守矢諏訪子 2021-11-10 21:51:31 +09:00
コミット 1b83c5b417
1個のファイルの変更3行の追加3行の削除

ファイルの表示

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