From ead0373759e936dc1245cc9615858bbdbc09b9d6 Mon Sep 17 00:00:00 2001 From: Przemyslaw Skierniewski Date: Sat, 27 Feb 2016 11:32:56 +0100 Subject: [PATCH] Added order by published date to entries on homepage --- app/Http/Controllers/HomeController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index fa25d59a..0e6f6a34 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -43,7 +43,8 @@ public function index(Request $request) ], [ ['isPromoted', 'DESC'], - ['isSticky', 'DESC'] + ['isSticky', 'DESC'], + ['publishedAt', 'DESC'] ], $request->get('page', 1), option('general', 'defaultPageSize', 20)