public function getSortParams($field) {
		// Clone the filters object. If you do not do this it will be passed
		// by reference and the values will be modified!
		$filters = clone $this->getFilters(false);

		if (!$filters->has('order_by')) {
			$filters->put('order_by', '');
		}

		if (!$filters->has('order_dir')) {
			$filters->put('order_dir', 'ASC');
		}

		if ($filters['order_by'] == $field) {
			if (!$filters->has('order_dir') || $filters['order_dir'] == 'ASC') {
				$filters->put('order_dir', 'DESC');
			} else {
				$filters->put('order_dir', 'ASC');
			}
		} else {
			$filters->put('order_by', $field);
			$filters->put('order_dir', 'ASC');
		}
		
		$per_page = intval(\Illuminate\Support\Facades\Request::get('per_page', \Config::get('pagination.per_page')));
        	$per_page = $per_page > 0 ? $per_page : \Config::get('pagination.per_page');

		return ['f' => $filters->toArray(), 'page' => 1, 'per_page' => $per_page];
	}
public function getSortParams($field) {
		// Clone the filters object. If you do not do this it will be passed
		// by reference and the values will be modified!
		$filters = clone $this->getFilters(false);

		if (!$filters->has('order_by')) {
			$filters->put('order_by', '');
		}

		if (!$filters->has('order_dir')) {
			$filters->put('order_dir', 'ASC');
		}

		if ($filters['order_by'] == $field) {
			if (!$filters->has('order_dir') || $filters['order_dir'] == 'ASC') {
				$filters->put('order_dir', 'DESC');
			} else {
				$filters->put('order_dir', 'ASC');
			}
		} else {
			$filters->put('order_by', $field);
			$filters->put('order_dir', 'ASC');
		}
		
		$per_page = intval(\Illuminate\Support\Facades\Request::get('per_page', \Config::get('pagination.per_page')));
        	$per_page = $per_page > 0 ? $per_page : \Config::get('pagination.per_page');

		return ['f' => $filters->toArray(), 'page' => 1, 'per_page' => $per_page];
	}
public function getSortParams ( $ field ) { // Clone the filters object. If you do not do this it will be passed // by reference and the values will be modified! $ filters = clone $ this -> getFilters ( false ) ; if ( ! $ filters -> has ( 'order_by' ) ) { $ filters -> put ( 'order_by' , '' ) ; } if ( ! $ filters -> has ( 'order_dir' ) ) { $ filters -> put ( 'order_dir' , 'ASC' ) ; } if ( $ filters [ 'order_by' ] == $ field ) { if ( ! $ filters -> has ( 'order_dir' ) || $ filters [ 'order_dir' ] == 'ASC' ) { $ filters -> put ( 'order_dir' , 'DESC' ) ; } else { $ filters -> put ( 'order_dir' , 'ASC' ) ; } } else { $ filters -> put ( 'order_by' , $ field ) ; $ filters -> put ( 'order_dir' , 'ASC' ) ; } $ per_page = intval ( \ Illuminate \ Support \ Facades \ Request :: get ( 'per_page' , \ Config :: get ( 'pagination.per_page' ) ) ) ; $ per_page = $ per_page > 0 ? $ per_page : \ Config :: get ( 'pagination.per_page' ) ; return [ 'f' => $ filters -> toArray ( ) , 'page' => 1 , 'per_page' => $ per_page ] ; }
Get array of data for sort links at the header of the grid

@param $field

@return array
Get array of data for sort links at the header of the grid