orchestral/html — pull request #24 by wisepotato (2014-07-26 21:41:03+00:00)
Title: actually make the columns sortable

Try this.

Your `table/horizontal.php` should be:

```php
'table table-striped')); ?>
>

headers ?: array()); ?>>

label;?>
id), $sortable) && $col->id == strtolower($col->label))
{
$inputQuery= \Input::query();
$pageQuery = isset($inputQuery['page']) ? array('page' => $inputQuery['page']) : array();
$links = array(
'desc' => \URL::current() . '?' . http_build_query(array_merge([$sortKey=> $col->id, $orderKey => 'desc'], $pageQuery)),
'asc' => \URL::current() . '?' . http_build_query([$sortKey=> $col->id, $orderKey => 'asc']),
);

$currentSort = strtolower($inputQuery[$sortKey]);
$currentOrder = $inputQuery[$orderKey];
?>

[
id && $currentOrder == 'desc') ? 'ASC' : 'ASC'; ?> /
id && $currentOrder == 'asc') ? 'DESC' : 'DESC'; ?>
]

>

attributes, $row)); ?>>
getValue($row); ?>

```

What do you think about this