Skip to content

Commit

Permalink
Cleaning URL (array_filter), if parameter is empty.
Browse files Browse the repository at this point in the history
see #31
  • Loading branch information
Kyslik committed Aug 1, 2016
1 parent d558b8e commit dc3d002
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ColumnSortable/Sortable.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public static function link(array $parameters) //Extending Blade; Blade sends ar
'order' => $order,
];

$queryString = http_build_query(array_merge(Request::except('sort', 'order', 'page'), $parameters));
$queryString = http_build_query(array_merge(array_filter(Request::except('sort', 'order', 'page')), $parameters));
$anchorClass = Config::get('columnsortable.anchor_class', null);
if ($anchorClass !== null) {
$anchorClass = 'class="' . $anchorClass . '"';
Expand Down

0 comments on commit dc3d002

Please sign in to comment.