SHARE
TWEET

Untitled

a guest Jun 15th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2.  
  3.   $(".clickMe").click(function(){
  4.       $.ajax({
  5.         dataType: 'json',
  6.         type:'GET',
  7.         url: "{{ url('loadMore/4') }}",
  8.       }).done(function(data){
  9.         var len=data.length;
  10.         console.log(len);
  11.          //Perform ANy action after successfuly post data
  12.          var rows = '';
  13.         for(i=0; i<data.length; i++){
  14.               rows += data[i].titulo;
  15.         }
  16.  
  17.         $("#morePosts").html(rows);  
  18.       })  
  19.  
  20.   });
  21. </script>
  22.      
  23. public function loadMore($numRecibido){
  24.  
  25.  $post = Publicacion::take(1)->skip($numRecibido)->get();
  26.  return response()->json($post);
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top