複数親の場合、ミーティングの画像とPDFの表示バグの修正

このコミットが含まれているのは:
守矢諏訪子 2022-02-01 21:56:27 +09:00
コミット a1b5356e30
1個のファイルの変更2行の追加2行の削除

ファイルの表示

@ -33,7 +33,7 @@ class FilesController extends Controller {
// 子供
if (session()->has('children')) {
// ミーティング
if (null !== ($rel = FatherRelation::where('child_id', (int)session()->get('children')['id'])->first())) {
foreach ($rel = FatherRelation::where('child_id', (int)session()->get('children')['id'])->get() as $rel) {
if (null !== (Meeting::where('father_id', $rel->father_id)->where('pdf', '/files/'.$path)->first())) {
$got = true;
}
@ -55,7 +55,7 @@ class FilesController extends Controller {
if (null !== ($meetimg = MeetingImage::where('image', '/files/'.$path)->first())) {
// 子供
if (session()->has('children')) {
if (null !== ($rel = FatherRelation::where('child_id', (int)session()->get('children')['id'])->first())) {
foreach (FatherRelation::where('child_id', (int)session()->get('children')['id'])->get() as $rel) {
if (null !== (Meeting::where('id', $meetimg->meeting_id)->where('father_id', $rel->father_id)->first())) {
$got = true;
}