Laravel Chumper datatables.net -
i'm newbie in laravel , want use datatables.net. want using chumper datatables.net in projects? after installing that. how use or update code server side (sajaxsource)?
otable_categories =$('#showcategories').datatable({ "blengthchange": false, "idisplaylength": 6, "bscrollcollapse": true, "bjqueryui": true, "bautowidth": false, "sajaxsource": "server_processing.php", "spaginationtype": "full_numbers", "bprocessing": true, "fndrawcallback": function() { clickrowhandler_categories(); }, "fnserverparams": function ( aodata ) { aodata.push( {"name": "id" , "value": "id" }, {"name": "title" , "value": "title" }, {"name": "join" , "value": "" }, {"name": "action" , "value": "categories" } )} }); function clickrowhandler_categories() { $('#showcategories tbody tr').bind('click', function () { var adata = otable_categories.fngetdata( ); if ( adata == null ) return false; iid_categories = adata[0]; }); } i must define new route such :
route::controller( 'mediamanagment','mediamanagmentcontroller', array( 'getindex' => 'mediamanagment.index', 'postupdate' => 'mediamanagment.update', ) ); i not know how use that. thanks
here, "sajaxsource": "server_processing.php" should contain url of controller sending more/paginated data/records/models use mediamanagment because url invoke getindex() method. so, use this:
"sajaxsource": "mediamanagment" // http://example.com/mediamanagment do processing in getindex() method.
Comments
Post a Comment