Skip to content

Commit

Permalink
Merge branch 'antkowiakit-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyslik committed Aug 25, 2016
2 parents dc3d002 + f7f2200 commit 39aeb3b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kyslik/column-sortable",
"description": "Package for handling column sorting in Laravel 5.1 and Laravel 5.2",
"description": "Package for handling column sorting in Laravel 5.1, 5.2 and 5.3",
"keywords": ["sortable", "sorting", "column", "laravel", "one-to-one"],
"license": "MIT",
"authors": [
Expand All @@ -10,14 +10,14 @@
}
],
"require": {
"php": ">=5.5.9",
"Illuminate/Support": "5.1.* || 5.2.*",
"Illuminate/Database": "5.1.* || 5.2.*"
"php": ">=5.6.4",
"Illuminate/Support": "5.1.* || 5.2.* || 5.3.*",
"Illuminate/Database": "5.1.* || 5.2.* || 5.3.*"
},
"autoload": {
"psr-4": {
"Kyslik\\ColumnSortable\\": "src/ColumnSortable/"
}
},
"minimum-stability": "dev"
}
}
5 changes: 4 additions & 1 deletion src/ColumnSortable/ColumnSortableServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ protected function registerBladeExtensions()
$blade = $this->app['view']->getEngineResolver()->resolve('blade')->getCompiler();

$blade->directive('sortablelink', function ($expression) {
return "<?php echo \Kyslik\ColumnSortable\Sortable::link(array {$expression});?>";
if ($expression[0] === '(') {
return "<?php echo \Kyslik\ColumnSortable\Sortable::link(array {$expression});?>";
}
return "<?php echo \Kyslik\ColumnSortable\Sortable::link(array ({$expression}));?>";
});
}
}

0 comments on commit 39aeb3b

Please sign in to comment.