diff options
| -rw-r--r-- | app/Http/Controllers/IndexController.php | 2 | ||||
| -rw-r--r-- | resources/views/list.blade.php | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/Http/Controllers/IndexController.php b/app/Http/Controllers/IndexController.php index 7ae362a..dbbbfb1 100644 --- a/app/Http/Controllers/IndexController.php +++ b/app/Http/Controllers/IndexController.php @@ -69,6 +69,8 @@ class IndexController extends Controller }); } $count = $articles->count(); + + $articles = $articles->orderBy('impact', 'desc'); $articles = $articles->orderBy('created_at', 'desc'); $articles = $articles->simplePaginate(10); diff --git a/resources/views/list.blade.php b/resources/views/list.blade.php index 82d53e5..5a5949a 100644 --- a/resources/views/list.blade.php +++ b/resources/views/list.blade.php @@ -60,7 +60,7 @@ html { </div> @else <h1 class="card-header"> - Most {{ ucwords(Request::route()->getName()) }} Articles + {{ ucwords(Request::route()->getName()) }} Articles @if ( "1" != $articles->currentPage() ) (Page {{ $articles->currentPage() }}) @endif @@ -120,7 +120,7 @@ html { <div style="margin-bottom: 20px"></div> @endforeach - {{ $articles->links() }} + {{ $articles->appends(Request::input())->links() }} </div> @endsection |
