title: Laravel: rendering partial views with AJAX requests
body: <p>I am trying to make a single page CRUD application and I am using AJAX with jQuery. In this case, I submit the form and store a new country in my database asynchronously and then render a partial view with the new data.</p>
  
  <p>This is my script and the method that retrieves the countries from the database and returns the partial view.</p>
  
  <pre><code>$('#create-country-form').submit(function(event) {
      $.post('/country/store', $('#create-country-form').serialize(), function() {
          $.get('/country/all', function(data) {
              $('#countries-table').empty();
              $('#countries-table').append(data['html']);
          });
      });
      event.preventDefault();
  });
  
  class CountryController extends BaseController {
  
      public function all() {
          $countries = Country::All();
  
          $html = View::make('countries.list', compact('countries'))-&gt;render();
  
          return Response::json(['html' =&gt; $html]);
      }
  
      // ...
  
  }
  </code></pre>
  
  <p>However, I don't like the idea of actually rendering the view in the page using jQuery, it feels like this should be Laravel's work.</p>
  
  <p>How can I render with Laravel a partial view along with the use of AJAX, and not having to delegate that work to jQuery (<code>append()</code> and <code>empty()</code>)?</p>