Skip to content

Commit

Permalink
方針・規約一覧ページの順序案内を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
miyacorata committed Sep 11, 2022
1 parent 7a8f5e0 commit b6c5d30
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .idea/Lemonade.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion app/Http/Controllers/InfoController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ public function index(Request $request)
$page_info = [];
$order_column = 'updated_at';
$order_direction = 'desc';
$order_info_ja = '更新が新しい順';

switch ($request->get('list')) {
case 'terms':
$page_info['type'] = '規約・方針';
$order_column = 'title';
$order_direction = 'asc';
$order_info_ja = '辞書順';
break;
default:
$page_info['type'] = 'お知らせ一覧';
Expand All @@ -42,7 +44,7 @@ public function index(Request $request)
->orderBy($order_column, $order_direction)
->get();

return view('info.index', compact('notices', 'page_info'));
return view('info.index', compact('notices', 'page_info', 'order_info_ja'));
}

public function show(string $slug, Request $request)
Expand Down
2 changes: 1 addition & 1 deletion resources/views/info/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<main>
<div class="top-options">
<div>
<span>更新が新しい順</span>
<span>{{ $order_info_ja }}</span>
</div>
<div>
<span class="info">登録数 : {{ count($notices) }}</span>
Expand Down

0 comments on commit b6c5d30

Please sign in to comment.