From ac4b81a164082b66a3fe7775a725f326e3fbb11a Mon Sep 17 00:00:00 2001 From: Robert Fridzema Date: Wed, 31 Jan 2018 13:15:17 +0100 Subject: [PATCH 1/6] Update to BladeCompiler same issue as https://github.com/404labfr/laravel-impersonate/pull/25, https://github.com/tightenco/ziggy/issues/115, https://github.com/spatie/laravel-blade-javascript/pull/25 --- src/Provider.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Provider.php b/src/Provider.php index 6ca78e7..1cfa063 100644 --- a/src/Provider.php +++ b/src/Provider.php @@ -2,7 +2,7 @@ namespace Akaunting\Money; -use Blade; +use Illuminate\View\Compilers\BladeCompiler; use Illuminate\Support\ServiceProvider; class Provider extends ServiceProvider @@ -22,12 +22,16 @@ public function boot() Currency::setCurrencies($this->app->make('config')->get('money')); // Register blade directives - Blade::directive('money', function ($expression) { - return ""; + $this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler) { + $bladeCompiler->directive('money', function ($expression) { + return ""; + }); }); - - Blade::directive('currency', function ($expression) { - return ""; + + $this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler) { + $bladeCompiler->directive('currency', function ($expression) { + return ""; + }); }); } From 3b7f1096384af68ca8021ef7d9fd6bac6101b4be Mon Sep 17 00:00:00 2001 From: Robert Fridzema Date: Mon, 5 Feb 2018 09:17:52 +0100 Subject: [PATCH 2/6] Update Provider.php --- src/Provider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Provider.php b/src/Provider.php index 1cfa063..5b2b38a 100644 --- a/src/Provider.php +++ b/src/Provider.php @@ -24,13 +24,13 @@ public function boot() // Register blade directives $this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler) { $bladeCompiler->directive('money', function ($expression) { - return ""; + return ""; }); }); $this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler) { $bladeCompiler->directive('currency', function ($expression) { - return ""; + return ""; }); }); } From a00a3de64a62bf30b6f99779e2c464ee6454d43a Mon Sep 17 00:00:00 2001 From: Robert Fridzema Date: Tue, 6 Feb 2018 11:59:28 +0100 Subject: [PATCH 3/6] Styleci Indentation problem?? Switched to tabs --- src/Provider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Provider.php b/src/Provider.php index 5b2b38a..64e85f9 100644 --- a/src/Provider.php +++ b/src/Provider.php @@ -24,13 +24,13 @@ public function boot() // Register blade directives $this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler) { $bladeCompiler->directive('money', function ($expression) { - return ""; + return ""; }); }); $this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler) { $bladeCompiler->directive('currency', function ($expression) { - return ""; + return ""; }); }); } From 88f610855dd7fed620a65f92f1a97e02192796c6 Mon Sep 17 00:00:00 2001 From: Robert Fridzema Date: Tue, 6 Feb 2018 12:01:11 +0100 Subject: [PATCH 4/6] Styleci fix 2 Indentation --- src/Provider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Provider.php b/src/Provider.php index 64e85f9..5b2b38a 100644 --- a/src/Provider.php +++ b/src/Provider.php @@ -24,13 +24,13 @@ public function boot() // Register blade directives $this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler) { $bladeCompiler->directive('money', function ($expression) { - return ""; + return ""; }); }); $this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler) { $bladeCompiler->directive('currency', function ($expression) { - return ""; + return ""; }); }); } From 3e2f06e8ad5866652c181b80a3405483e8d11fd3 Mon Sep 17 00:00:00 2001 From: Robert Fridzema Date: Tue, 6 Feb 2018 12:02:58 +0100 Subject: [PATCH 5/6] Styleci 3 --- src/Provider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Provider.php b/src/Provider.php index 5b2b38a..2924e7d 100644 --- a/src/Provider.php +++ b/src/Provider.php @@ -27,7 +27,7 @@ public function boot() return ""; }); }); - + $this->app->afterResolving('blade.compiler', function (BladeCompiler $bladeCompiler) { $bladeCompiler->directive('currency', function ($expression) { return ""; From d682378ecfc5b877192c039cf0a1c9f7f0fe29eb Mon Sep 17 00:00:00 2001 From: Robert Fridzema Date: Tue, 6 Feb 2018 12:03:59 +0100 Subject: [PATCH 6/6] Order --- src/Provider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Provider.php b/src/Provider.php index 2924e7d..9e7b51e 100644 --- a/src/Provider.php +++ b/src/Provider.php @@ -2,8 +2,8 @@ namespace Akaunting\Money; -use Illuminate\View\Compilers\BladeCompiler; use Illuminate\Support\ServiceProvider; +use Illuminate\View\Compilers\BladeCompiler; class Provider extends ServiceProvider {