I come to Laravel 4.x from Codeigniter & don't understand Laravel errors messaging. I am trying to load view into a view this is my code
Route
Route::get('widget/addcustomer', 'WidgetController@addcustomer');
Controller
public function addcustomer()
{
return View::make('widget.addcustomer')->render();
}
Main view.blade.php
<script>
function loadwidget(1, 'formname', 1)
{
var widget_url = '<?php echo URL::to('widget'); ?>';
$.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;
}
</script>
External view.php
<form id="customer_form">
<table><tr><td>....</td></tr></table>
</form>
but in fire bug I am getting
{"error":{"type":"Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException","message":"","file":"E:\\xampp\\htdocs\\tt_kickoff\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php","line":210}}
and if I hit http://localhost/tt_kickoff/widget/addcustomer
it is loading correct html