Tokumeikoi 5 years ago
parent
commit
50ffdd9db9
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/Http/Controllers/User/NoticeController.php

+ 3 - 1
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()
         ]);
     }
 }