I started to learn Laravel. And displayed a lot of problems. Much too much for a product which should facilitate life. But not about this story is the story.
Laravel 4, jQuery 2
Try to download the content from another file in the main file by pressing a button.
But page javascript thrown "Uncaught ReferenceError: address is not defined"
And the place where you want to retrieve new content upload itself.
Weirdest that another laravel site with the same settings, everything is loading.
Main file with content place and jquery ajax script
$('#lsnbBtnAddHistory').on('click', function() {
$.get('address-view-history', { aid: aid }, function(result) {
$('#itemContent').html(result);
});
});
route.php file
Route::get('/address-view-history/', array(
'as' => 'address-view-history-get',
'uses' => 'AddressController@getAddressViewHistory'
));
Does anybody have an idea why route.php file not found url path.
Edit: I found a solution that works
$.get(
'{{ URL::asset("/") }}address-view-history',
{},
function(result)
{
$('#itemContent').html(result);
});
But another laravel folder/page/site with the same settings on the same computer works without {{URL :: asset ("/")}}. Why route.php unable to retrieve and process the "address-view-history"?