title: How to asynchronously get rows from the database?
body: <p>I made a blog using laravel and php. In my main page I show all my posts from my database at once. I want to load my posts one at a time kinda like facebook does.
  I am using jquery ajax methods but I don't have a clear picture of how should I code it.</p>
  
  <p>This is how I am trying to do it in my controller</p>
  
  <pre><code>// retrieve all the post from the database
  $posts = DB::table('posts')-&gt;get();
  
  return response() //what should I add here
  // what should I do next
  </code></pre>
  
  <p>on the html side </p>
  
  <pre><code>$.ajax('/', {dataType: html}).done();
  </code></pre>
  
  <p>I want response as html and I am going to prepend it to the body.</p>