From 50ffdd9db91289d9e710d4971c12db17da713758 Mon Sep 17 00:00:00 2001 From: Tokumeikoi Date: Thu, 30 Jan 2020 19:59:06 +0800 Subject: [PATCH] update --- app/Http/Controllers/User/NoticeController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/User/NoticeController.php b/app/Http/Controllers/User/NoticeController.php index d3ff68ca..b6db1c50 100644 --- a/app/Http/Controllers/User/NoticeController.php +++ b/app/Http/Controllers/User/NoticeController.php @@ -12,7 +12,9 @@ class NoticeController extends Controller public function fetch(Request $request) { return response([ - 'data' => Notice::orderBy('created_at', 'DESC')->get() + 'data' => Notice::orderBy('created_at', 'DESC') + ->limit(5) + ->get() ]); } }