title: how to use Bootstrap-vue in laravel to include pagination to tables
body: <p>i don't know how to add pagination to tables,to make the pages more cleaner when i have a lot of data to show on tables.</p>
  
  <p>i searched for bootstrap-vue and learned a bit of Vue.js (components ... etc) but seeing this code from : 
  <a href="https://bootstrap-vue.js.org/docs/components/pagination-nav/" rel="nofollow noreferrer">https://bootstrap-vue.js.org/docs/components/pagination-nav/</a></p>
  
  <pre><code>    &lt;template&gt;
        &lt;div class="overflow-auto"&gt;
        &lt;b-pagination-nav :link-gen="linkGen" :number-of-pages="10" use- router /&gt;
        &lt;/div&gt;
      &lt;/template&gt;
  
      &lt;script&gt;
        export default {
          methods: {
            linkGen(pageNum) {
              if (pageNum === 1) {
                return '?'
              } else {
                return '?page=' + pageNum
              }
            }
          }
        }
      &lt;/script&gt;
  </code></pre>
  
  <p>i did not understand what i should do to make this code run on my tables , and make the table pagination work .</p>
  
  <p>this is how the code that is showing the tables in my .blade.php looks :</p>
  
  <pre><code>&lt;table class="table" style="border-radius:1em;  border-collapse: collapse; overflow: hidden;"&gt;
                  &lt;thead class="thead-dark"&gt;
                    &lt;tr&gt;
                      &lt;th scope="col"&gt;Id&lt;/th&gt;
                      &lt;th scope="col"&gt;E-mail&lt;/th&gt;
                      &lt;th scope="col"&gt;Type_compte&lt;/th&gt;
                      &lt;th scope="col"&gt;District&lt;/th&gt;
                      &lt;th scope="col"&gt;Cds&lt;/th&gt;
                      &lt;th scope="col"&gt;crée a&lt;/th&gt;
                      &lt;th scope="col"&gt;Verifié&lt;/th&gt;
                      &lt;th scope="col"&gt;modifier&lt;/th&gt;
                      &lt;th scope="col"&gt;supprimer&lt;/th&gt;
                    &lt;/tr&gt;
                  &lt;/thead&gt;
                  @foreach($utilisateurs as $utilisateur)
                  &lt;tr&gt;
                          &lt;th&gt;{{$utilisateur-&gt;id}}&lt;/th&gt;
                          &lt;td&gt;{{$utilisateur-&gt;email}}&lt;/td&gt;
                          &lt;td&gt;{{$utilisateur-&gt;Type_compte}}&lt;/td&gt;
                          &lt;td&gt;{{$utilisateur-&gt;district == '' ? '/' : $utilisateur-&gt;district}}&lt;/td&gt;
                          &lt;td&gt;{{$utilisateur-&gt;cds == '' ? '/' : $utilisateur-&gt;cds}}&lt;/td&gt;
                          &lt;td&gt;{{$utilisateur-&gt;created_at}}&lt;/td&gt;
                          &lt;td&gt;{{$utilisateur-&gt;email_verified_at=='' ? 'Non' : 'Oui'}}&lt;/td&gt;
                          &lt;form method="GET" action="/comptes/{{$utilisateur-&gt;email}}/edit"&gt;
                            @csrf
                          &lt;td&gt;&lt;input type="submit" class="btn btn-warning" value="Modifier"&gt;&lt;/td&gt; 
                          &lt;/form&gt;                               
                          &lt;form method="POST" action="/comptes/{{$utilisateur-&gt;email}}"&gt;
                            @method('DELETE')
                            @csrf
                          &lt;td&gt;&lt;input type="submit" class="btn btn-danger" value="Supprimer"&gt;&lt;/td&gt; 
                          &lt;/form&gt;       
                  &lt;/tr&gt;
                  @endforeach
                &lt;/table&gt;
  </code></pre>
  
  <p>what should i do to make table pagination work ? and what is easiest way to do it ?</p>