]> _ Git - psq.git/commitdiff
paginate labo articles
authorLouis Jeckel <louis.jeckel@outlook.cm>
Sat, 3 Oct 2020 15:18:57 +0000 (17:18 +0200)
committerLouis Jeckel <louis.jeckel@outlook.cm>
Sat, 3 Oct 2020 15:18:57 +0000 (17:18 +0200)
app/Http/Controllers/ActuLabosController.php
app/Http/Controllers/Admin/LaboArticleController.php
resources/views/actu-labos/index.blade.php

index 3dc38b72913380b2641285c73f9ada4c36295488..03c00fe5dbd16a24987d8ee4d31c718806f33885 100644 (file)
@@ -12,7 +12,13 @@ class ActuLabosController extends Controller
     {
         \View::share('title', "L'actu des Labos");
 
-        \View::share('actus', LaboArticle::query()->orderBy('position')->published()->visible()->take(4)->get());
+        $articles = LaboArticle::query()
+            ->orderBy('position')
+            ->published()
+            ->visible()
+            ->paginate(4);
+//        ddd($articles->links());
+        \View::share('actus', $articles);
         return view('actu-labos.index');
     }
 
index 1c0fd94eff490ee12d38686d203173dc07f9e472..6ac678e5350418dc2f86d4d552ca8d7044961a96 100644 (file)
@@ -12,6 +12,9 @@ class LaboArticleController extends ModuleController
 
     protected $indexOptions = [
         'reorder' => true,
+//        'feature' => true,
+//        'bulk_feature' => true,
+
     ];
 }
 
index ef69c86738e5801a79232cf36c314d9e3d0de015..523b07920090bb8b2c8ab2b66286cbbd0730f315 100644 (file)
@@ -27,8 +27,9 @@
                 <x-pill-box class="mt-3" slug="actu-labos-3"></x-pill-box>
             </div>
 
-
-
+        </div>
+        <div class="row">
+            {{$actus->links()}}
         </div>
 
     </div>