オブジェクト→配列
このコミットが含まれているのは:
コミット
f0fa618352
|
@ -236,15 +236,14 @@ class MeetingsController extends Controller {
|
|||
return ['status_code' => 400];
|
||||
}
|
||||
foreach ($list as $i => $l) {
|
||||
if (null !== ($l->approval = MeetingApprovals::select($meeting_approvals_select)->whereNotNull('approval_at')->where('meeting_id', (int)$l->id)->first())) {
|
||||
if (null === ($l->approval->child = Child::select($child_select)->where('id', (int)$l->approval->child_id)->first())) {
|
||||
$l->approval->child = new \stdClass();
|
||||
if (null !== ($l->approval = MeetingApprovals::select($meeting_approvals_select)->whereNotNull('approval_at')->where('meeting_id', (int)$l->id)->get())) {
|
||||
foreach ($l->approval as $ii => $ll) {
|
||||
if (null === ($ll->child = Child::select($child_select)->where('id', (int)$ll->child_id)->first())) {
|
||||
$ll->child = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$l->approval = new \stdClass();
|
||||
$l->approval->child = new \stdClass();
|
||||
}
|
||||
|
||||
$result[] = $l;
|
||||
}
|
||||
|
||||
|
@ -267,15 +266,13 @@ class MeetingsController extends Controller {
|
|||
}
|
||||
|
||||
foreach ($list as $i => $l) {
|
||||
if (null !== ($l->approval = MeetingApprovals::select($meeting_approvals_select)->whereNull('approval_at')->where('meeting_id', (int)$l->id)->first())) {
|
||||
if (null === ($l->approval->child = Child::select($child_select)->where('id', (int)$l->approval->child_id)->first())) {
|
||||
$l->approval->child = new \stdClass();
|
||||
if (null !== ($l->approval = MeetingApprovals::select($meeting_approvals_select)->whereNull('approval_at')->where('meeting_id', (int)$l->id)->get())) {
|
||||
foreach ($l->approval as $ii => $ll) {
|
||||
if (null === ($ll->child = Child::select($child_select)->where('id', (int)$ll->child_id)->first())) {
|
||||
$ll->child = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$l->approval = new \stdClass();
|
||||
$l->approval->child = new \stdClass();
|
||||
}
|
||||
|
||||
$result[] = $l;
|
||||
}
|
||||
|
|
新しいイシューから参照