File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 55use Akaunting \Sortable \View \Components \SortableLink ;
66use Illuminate \Support \Facades \Blade ;
77use Illuminate \Support \ServiceProvider ;
8+ use Illuminate \View \Compilers \BladeCompiler ;
89
910class Provider extends ServiceProvider
1011{
@@ -36,10 +37,12 @@ public function boot()
3637
3738 public function registerBladeDirectives ()
3839 {
39- Blade::directive ('sortablelink ' , function ($ expression ) {
40- $ expression = ($ expression [0 ] === '( ' ) ? substr ($ expression , 1 , -1 ) : $ expression ;
40+ $ this ->callAfterResolving ('blade.compiler ' , function (BladeCompiler $ compiler ) {
41+ $ compiler ->directive ('sortablelink ' , function ($ expression ) {
42+ $ expression = ($ expression [0 ] === '( ' ) ? substr ($ expression , 1 , -1 ) : $ expression ;
4143
42- return "<?php echo \Akaunting\Sortable\Support\SortableLink::render(array ( {$ expression }));?> " ;
44+ return "<?php echo \Akaunting\Sortable\Support\SortableLink::render(array ( {$ expression }));?> " ;
45+ });
4346 });
4447 }
4548
You can’t perform that action at this time.
0 commit comments