public static function dataTableSorting($request, $parameters, $indexColumns)
    {
        $order      = $request->input('order');
        $columns    = $request->input('columns');

        if(is_array($order[0]) && isset($order[0]['column']) && isset($order[0]['dir']) && $columns[(int)$order[0]['column']]['orderable'] == 'true')
        {
            $parameters['order']['column']  = is_array($indexColumns[$order[0]['column']])? $indexColumns[$order[0]['column']]['data'] : $indexColumns[$order[0]['column']];
            $parameters['order']['dir']     = $order[0]['dir'];
        }

        return $parameters;
    }
public static function dataTableSorting($request, $parameters, $indexColumns)
    {
        $order      = $request->input('order');
        $columns    = $request->input('columns');

        if(is_array($order[0]) && isset($order[0]['column']) && isset($order[0]['dir']) && $columns[(int)$order[0]['column']]['orderable'] == 'true')
        {
            $parameters['order']['column']  = is_array($indexColumns[$order[0]['column']])? $indexColumns[$order[0]['column']]['data'] : $indexColumns[$order[0]['column']];
            $parameters['order']['dir']     = $order[0]['dir'];
        }

        return $parameters;
    }
public static function dataTableSorting ( $ request , $ parameters , $ indexColumns ) { $ order = $ request -> input ( 'order' ) ; $ columns = $ request -> input ( 'columns' ) ; if ( is_array ( $ order [ 0 ] ) && isset ( $ order [ 0 ] [ 'column' ] ) && isset ( $ order [ 0 ] [ 'dir' ] ) && $ columns [ ( int ) $ order [ 0 ] [ 'column' ] ] [ 'orderable' ] == 'true' ) { $ parameters [ 'order' ] [ 'column' ] = is_array ( $ indexColumns [ $ order [ 0 ] [ 'column' ] ] ) ? $ indexColumns [ $ order [ 0 ] [ 'column' ] ] [ 'data' ] : $ indexColumns [ $ order [ 0 ] [ 'column' ] ] ; $ parameters [ 'order' ] [ 'dir' ] = $ order [ 0 ] [ 'dir' ] ; } return $ parameters ; }
Function to set config arguments to sorting datatable

@access  public
@param   \Illuminate\Http\Request $request
@param   array   $parameters
@param   array   $indexColumns
@return  array
Function to set config arguments to sorting datatable