In dataTables shorting there are multiple columns we can short all of them
first we declare an array like below :
$orderBy = ['columnname1', 'columnname2', 'columnname3', 'columnname4', 'columnname5', 'columnname6'];
$results->orderBy($orderBy[$order[0]['column']], $order[0]['dir']);
$orderBy[$order[0]['column']] <---> Column Name ;
$order[0]['dir'] <---> Column direction ; assecnding/disanding
No comments:
Post a Comment