Compare commits

..

2 Commits

Author SHA1 Message Date
bbc7ae7e83 Merge pull request 'マイページお知らせ修正' (#28) from main_higashide into main
All checks were successful
Deploy so-manager (auto) / deploy (push) Successful in 21s
Reviewed-on: #28
2025-09-25 14:12:03 +09:00
dce7e1daad マイページお知らせ修正 2025-09-25 14:11:35 +09:00
2 changed files with 12 additions and 7 deletions

View File

@ -79,11 +79,11 @@ class MypageController extends Controller
->get();
// お知らせ情報を取得
$informations= DB::table('user_information_history')
$information = DB::table('user_information_history')
->where('user_id', $user_id)
->orderBy('user_information_history_id', 'desc')
->limit(3)
->get();
->select('entry_date', 'user_information_history')
->first();
\Log::info('マイページにアクセス', [
'user_id' => $user_id,
@ -94,7 +94,7 @@ class MypageController extends Controller
'user_name' => $user->user_name, // ユーザー名(ヘッダー用)
'contracts' => $contracts,
'seals' => $seals,
'informations' => $informations
'information' => $information
]);
}
}

View File

@ -243,9 +243,14 @@
</h5>
</div>
<ul class="info-slider_1-1">
@foreach($informations as $information)
<li><span class="small" style="margin-right: 1em;">{{ $information->entry_date }}</span>{{ $information->user_information_history }}</li>
@endforeach
@if($information)
<li>
<span class="small" style="margin-right: 1em;">{{ $information->entry_date }}</span>
{{ $information->user_information_history }}
</li>
@else
<li class="text-center">お知らせはありません。</li>
@endif
</ul>
</div>
</div>