diff --git a/backend/app/Http/Controllers/Api/FathersController.php b/backend/app/Http/Controllers/Api/FathersController.php index d50ddfc4..8a889648 100644 --- a/backend/app/Http/Controllers/Api/FathersController.php +++ b/backend/app/Http/Controllers/Api/FathersController.php @@ -230,7 +230,7 @@ class FathersController extends Controller { public function detail ($father_id) { $father_select = ['image', 'email', 'tel', 'profile', 'company']; - if (null === ($result = Father::select($father_select)->where('id', (int)$father_id)->orderBy('created_at', 'desc')->get()->toArray())) { + if (null === ($result = Father::select($father_select)->where('id', (int)$father_id)->orderBy('created_at', 'desc')->first())) { // 親詳細の取得に失敗 return ['status_code' => 400, 'error_messages' => ['親の更新に失敗しました。']]; }