I'm new to web development. I've an existing application, to which no active developer is there. Legacy code is wrapped in a laravel framework.
Laravel version 4.2
php version 5.5
OSX 10.9
I want data to be loaded in my jqgrid. I call from javascript. Get method. I can reach to route from it, however after that, I don't see myself moving ahead. No error, nothing.
My js code looks like:
Code: Select all
$(document).ready(function () {
$("#grid_illumina").jqGrid({
url:'illumina_xhr_get_data',
datatype: "json",
mtype: "GET",
jsonReader: {
repeatitems: false,
id: "",
root: function (obj) {
return obj;
},
records: function (obj) {
return obj.length;
},
page: function () {
return 1;
},
total: function () {
return 1;
}
},
colNames:['study','Sample Name','Forward Primer','Reverse Primer'],
colModel :[
{name:"study",sortable: true},
{name: "sample_name",sortable: true},
{name: "forward_primer",sortable: true},
{name: "reverse_primer",sortable: true}
],
rowNum:10, //this sets the default row in the pager
caption:"jqGrid Illumina", //title of the grid
pager: '#pager_illumina',
shrinkToFit : false,
rownumbers: true, //row numbers on left
multiselect: true, //check box
height: '400', //height: 'auto',
width: '1100',
gridview: true,
viewrecords:true, // this is for the View 1 - 8 of 8 \m/
sortorder:"asc", //asc
autoencode: true, //don't know
sortable:true, //sort
loadonce: false, //loadonce is must
rowList:[3,6,9], //drop down
page: 1,
rowNum: 3
});
My routes:
Code: Select all
Route::group(['prefix' => 'illumina', 'namespace' => 'Controllers\\illumina'], function() {
Log::info(Request::path()); //$uri = Request::path();
Route::get('illumina_xhr_get_data','mainIllumina@testAjax');
});
Code: Select all
<?php namespace Controllers\illumina;
use Log;
class mainIllumina extends \BaseController {
public function testAjax(){
echo "haha"; //cannot reach
Log::info("In the function of ajax");
}
}
?>
If I do it from the browser too, cannot reach function.
Any help or guidance shall be highly appreciated.