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 5
5
use Akaunting \Sortable \View \Components \SortableLink ;
6
6
use Illuminate \Support \Facades \Blade ;
7
7
use Illuminate \Support \ServiceProvider ;
8
+ use Illuminate \View \Compilers \BladeCompiler ;
8
9
9
10
class Provider extends ServiceProvider
10
11
{
@@ -36,10 +37,12 @@ public function boot()
36
37
37
38
public function registerBladeDirectives ()
38
39
{
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 ;
41
43
42
- return "<?php echo \Akaunting\Sortable\Support\SortableLink::render(array ( {$ expression }));?> " ;
44
+ return "<?php echo \Akaunting\Sortable\Support\SortableLink::render(array ( {$ expression }));?> " ;
45
+ });
43
46
});
44
47
}
45
48
You can’t perform that action at this time.
0 commit comments