title: Laravel: Load view in to a view via ajax
body: <p>I come to Laravel 4.x from Codeigniter &amp; don't understand Laravel errors messaging. I am trying to load view into a view this is my code</p>
  
  <p><strong>Route</strong></p>
  
  <pre><code>Route::get('widget/addcustomer', 'WidgetController@addcustomer');
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>public function addcustomer()
  {
      return View::make('widget.addcustomer')-&gt;render();
  }
  </code></pre>
  
  <p><strong>Main view.blade.php</strong></p>
  
  <pre><code>&lt;script&gt;
  function loadwidget(1, 'formname', 1)
  {   
      var widget_url = '&lt;?php echo URL::to('widget'); ?&gt;';
  
      $.ajax({
          type:'POST',
          url: widget_url+'/'+formname,
          dataType: "html",
          async: false,
          cache: false,
          success: function(response)
          {
              $('#'+divid).html(response);
  
              if(active==0)
              {               
                  $('#'+divid+' :input').attr('disabled', true);              
              }       
          }
      });
      return true;
  }
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>External view.php</strong></p>
  
  <pre><code>&lt;form id="customer_form"&gt;
      &lt;table&gt;&lt;tr&gt;&lt;td&gt;....&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>but in fire bug I am getting</p>
  
  <pre><code>{"error":{"type":"Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException","message":"","file":"E:\\xampp\\htdocs\\tt_kickoff\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php","line":210}}
  </code></pre>
  
  <p>and if I hit <code>http://localhost/tt_kickoff/widget/addcustomer</code>
  it is loading correct html</p>