diff --git a/README.md b/README.md index c595625..2a0e291 100755 --- a/README.md +++ b/README.md @@ -109,8 +109,6 @@ There is one blade extension for you to use **@sortablelink** **Column** (1st) parameter is `order by` and **Title** (2nd) parameter is displayed inside anchor tags. You can omit **Title** parameter. ->**WARNING**: @sortablelink directive only accepts single quotes - ## Config in few words Sortablelink blade extension distinguishes between "types" (numeric, amount and alpha) and applies different class for each of them. See following snippet: diff --git a/src/ColumnSortable/ColumnSortableServiceProvider.php b/src/ColumnSortable/ColumnSortableServiceProvider.php index 4ee8985..7830c0c 100755 --- a/src/ColumnSortable/ColumnSortableServiceProvider.php +++ b/src/ColumnSortable/ColumnSortableServiceProvider.php @@ -32,7 +32,7 @@ public function boot() Blade::directive('sortablelink', function ($expression) { //TODO: only accepts single quotes 'Email', would be nice to accept double quotes as well. $expression = ($expression[0] === '(') ? substr($expression, 1, -1) : $expression; - return ""; + return ""; }); } diff --git a/src/ColumnSortable/SortableLink.php b/src/ColumnSortable/SortableLink.php index 96c1eb0..730b9f9 100644 --- a/src/ColumnSortable/SortableLink.php +++ b/src/ColumnSortable/SortableLink.php @@ -14,13 +14,11 @@ class SortableLink { /** - * @param String $parameters + * @param array $parameters * @return string */ - public static function render($parameters) + public static function render(array $parameters) { - $parameters = str_getcsv($parameters, ',', '\''); - if (count($parameters) === 1) { $title = self::getOneToOneSortOrNull($parameters[0]); $title = (is_null($title)) ? $parameters[0] : $title[1];