title: Load data into view via ajax from db in Laravel 4
body: <p>So far I have a User view that contains a typehead input box and a button.</p>
  
  <p>I can manage to get the id of the selected user and display it when clicking on the button:</p>
  
  <pre><code>$('#load').bind('click', function(e)
  {
     alert(selected);
  });
  </code></pre>
  
  <p>Now I want to retrieve the data for the selected user from the database and display it in the User view. Here is my jQuery, route and controller:</p>
  
  <pre><code>var details = '&lt;?php echo URL::to('details'); ?&gt;';
  $.getJSON(
      details, 
      function(data) 
      {
          $('#details').html(data);
      }
  );
  
  Route::get('details', 'HomeController@Details');
  
  public function Details()
  {
      $data = array('name' =&gt; 'Ste');
      return View::make('user')-&gt;nest('details', $data);
  }
  </code></pre>
  
  <p>I've read multiple articles of AJAX in Laravel but am no closer to getting this working.<br>
  Does anyone know of a good tutorial for doing this or am I doing something obviously wrong?</p>