title: how to create pagination links from json data in laravel blade
body: <p>i am trying to create pagination links from json response in laravel blade template. i know it simply can create using php, but how can i do this from a json response.</p>
  
  <p>here is my controller method :</p>
  
  <pre><code>function getContact()
  {   
       return $contacts = Contact::where(array('is_active'=&gt;1))
                          -&gt;paginate(2);
  }
  </code></pre>
  
  <p>and here is my jquery ajax code to show data on table...</p>
  
  <pre><code>   $.ajax({
              type:'GET',
              url: '&lt;?php echo URL::to('contactgroup/contact') ?&gt;', 
  
              dataType: 'json',               
              success: function(data){
                  //console.log(data['data'].length);
              var table='&lt;thead&gt;&lt;th&gt;&lt;input type="checkbox" id="checkAll" name="checkAll[]"/&gt;&lt;/th&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;contact No&lt;/th&gt;&lt;/thead&gt;';
              for(var i=0; i&lt;data['data'].length; i++){
                  table += '&lt;tr&gt;&lt;td&gt;&lt;input type="checkbox" name="checkbox[]" class="individualCheckbox" value="'+data['data'][i].id+'"/&gt;&lt;/td&gt;&lt;td&gt;'+data['data'][i].contact_name+'&lt;/td&gt;&lt;td&gt;'+data['data'][i].primary_contact_no+'&lt;/td&gt;&lt;/tr&gt;';
  
              }
              $('#contactTable').empty();
              $('#contactTable').append(table);
             }
         });
  </code></pre>
  
  <p>and the json response in console.log is-</p>
  
  <pre><code>{"total":3,"per_page":2,"current_page":1,"last_page":2,"next_page_url":"http:\/\/localhost\/smsapi\/public\/contactgroup\/contact\/?page=2","prev_page_url":null,"from":1,"to":2,"data":[{"id":1,"contact_name"
  :"M Islam","primary_contact_no":"017********","personal_email":"m@company.com","work_email"
  :"m@company.com","personal_phone":"017********","work_phone":"017********","personal_address":"abc","work_address":"ring road","is_active":1,"entry_by":7},{"id":4,"contact_name":"sdsdf","primary_contact_no":"242342","personal_email":"mu@company.com","work_email":"mu@company.com","personal_phone":"12142","work_phone":"fgbf","personal_address":"gfg","work_address":"fgfg"
  ,"is_active":1,"entry_by":7}]}
  </code></pre>
  
  <p>i can show the data into a table using above jquery code but how can i show the pagination from <code>"total":3,"per_page":2,"current_page":1,"last_page":2,"next_page_url":"http:\/\/localhost\/smsapi\/public\/contactgroup\/contact\/?page=2","prev_page_url":null,"from":1,"to":2,</code></p>
  
  <p>using jquery.</p>