diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index e8b1e5e..46216cc 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -30,7 +30,7 @@ class HomeController extends Controller if (Auth::check()) { $informations = Information::query() ->select('id', 'category', 'pinned', 'title', 'created_at') - ->orderBy('pinned') + ->orderByDesc('pinned') ->orderByDesc('created_at') ->paginate(3); $categories = Information::CATEGORIES; diff --git a/app/Http/Controllers/InfoController.php b/app/Http/Controllers/InfoController.php index 4b6ef31..6a43159 100644 --- a/app/Http/Controllers/InfoController.php +++ b/app/Http/Controllers/InfoController.php @@ -11,7 +11,7 @@ class InfoController extends Controller { $informations = Information::query() ->select('id', 'category', 'pinned', 'title', 'created_at') - ->orderBy('pinned') + ->orderByDesc('pinned') ->orderByDesc('created_at') ->paginate(20); return view('info.index')->with([