File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 3
3
namespace Akaunting \Apexcharts ;
4
4
5
5
use Akaunting \Apexcharts \Charts ;
6
- use Illuminate \Support \Facades \Blade ;
7
6
use Illuminate \Support \ServiceProvider ;
7
+ use Illuminate \View \Compilers \BladeCompiler ;
8
8
9
9
class Provider extends ServiceProvider
10
10
{
@@ -40,8 +40,10 @@ public function boot()
40
40
41
41
public function registerBladeDirectives ()
42
42
{
43
- Blade::directive ('apexchartsScripts ' , function ($ expression ) {
44
- return '{!! \Akaunting\Apexcharts\Charts::loadScript( ' . $ expression . ') !!} ' ;
43
+ $ this ->app ->afterResolving ('blade.compiler ' , function (BladeCompiler $ bladeCompiler ) {
44
+ $ bladeCompiler ->directive ('apexchartsScripts ' , function ($ expression ) {
45
+ return '{!! \Akaunting\Apexcharts\Charts::loadScript( ' . $ expression . ') !!} ' ;
46
+ });
45
47
});
46
48
}
47
49
}
You can’t perform that action at this time.
0 commit comments