このコミットが含まれているのは:
守矢諏訪子 2021-11-06 18:24:18 +09:00
コミット 26f2d6ec60
1個のファイルの変更8行の追加16行の削除

ファイルの表示

@ -151,10 +151,8 @@ class MeetingsController extends Controller {
if (null === ($l->meeting_images = MeetingImage::select($meeting_images_select)->where('meeting_id', (int)$l->id)->get())) {
$l->meeting_images = [];
}
if (null !== ($fr = FatherRelation::select('father_id')->where('child_id', (int)$r->child_id)->first())) {
if (null === ($l->father = Father::select($father_select)->where('id', (int)$fr->father_id)->first())) {
$l->father = new \stdClass();
}
if (null === ($l->father = Father::select($father_select)->where('id', (int)$l->father_id)->first())) {
$l->father = new \stdClass();
}
if (null === ($l->meeting_approvals = MeetingApprovals::select($meeting_approvals_select)->whereNotNull('approval_at')->where('meeting_id', (int)$l->id)->orderBy('updated_at', 'desc')->get())) {
$l->meeting_approvals = [];
@ -191,10 +189,8 @@ class MeetingsController extends Controller {
if (null === ($l->meeting_images = MeetingImage::select($meeting_images_select)->where('meeting_id', (int)$l->id)->get())) {
$l->meeting_images = [];
}
if (null !== ($fr = FatherRelation::select('father_id')->where('child_id', (int)$r->child_id)->first())) {
if (null === ($l->father = Father::select($father_select)->where('id', (int)$fr->father_id)->first())) {
$l->father = new \stdClass();
}
if (null === ($l->father = Father::select($father_select)->where('id', (int)$l->father_id)->first())) {
$l->father = new \stdClass();
}
if (null === ($l->meeting_approvals = MeetingApprovals::select($meeting_approvals_select)->whereNull('approval_at')->where('meeting_id', (int)$l->id)->orderBy('approval_at', 'asc')->get())) {
$l->meeting_approvals = [];
@ -355,10 +351,8 @@ class MeetingsController extends Controller {
}
foreach ($list as $i => $l) {
if (null !== ($fr = FatherRelation::select('father_id')->where('child_id', (int)$r->child_id)->first())) {
if (null === ($l->father = Father::select($father_select)->where('id', (int)$fr->father_id)->first())) {
$l->father = new \stdClass();
}
if (null === ($l->father = Father::select($father_select)->where('id', (int)$l->father_id)->first())) {
$l->father = new \stdClass();
}
if (null === ($l->approval = MeetingApprovals::select($meeting_approvals_select)->where('child_id', (int)$r->child_id)->whereNotNull('approval_at')->get())) {
$l->approval = [];
@ -385,10 +379,8 @@ class MeetingsController extends Controller {
}
foreach ($list as $i => $l) {
if (null !== ($fr = FatherRelation::select('father_id')->where('child_id', (int)$r->child_id)->first())) {
if (null === ($l->father = Father::select($father_select)->where('id', (int)$fr->father_id)->first())) {
$l->father = new \stdClass();
}
if (null === ($l->father = Father::select($father_select)->where('id', (int)$l->father_id)->first())) {
$l->father = new \stdClass();
}
if (null === ($l->approval = MeetingApprovals::select($meeting_approvals_select)->where('child_id', (int)$r->child_id)->whereNull('approval_at')->get())) {
$l->approval = [];