Tokumeikoi hace 5 años
padre
commit
50ffdd9db9
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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()
         ]);
     }
 }