From a3d2f8fd627bd5bfb9a365f07094f3bf5d2d69c1 Mon Sep 17 00:00:00 2001 From: jianmingLee Date: Wed, 11 Sep 2019 08:51:38 +0800 Subject: [PATCH 1/3] support laravel 6.0 support laravel 6.0 --- src/LightboxDisplayer.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/LightboxDisplayer.php b/src/LightboxDisplayer.php index c18b405..e6a1f3d 100644 --- a/src/LightboxDisplayer.php +++ b/src/LightboxDisplayer.php @@ -43,10 +43,10 @@ public function display(array $options = []) $this->value = $this->value->toArray(); } - $server = array_get($options, 'server'); - $width = array_get($options, 'width', 200); - $height = array_get($options, 'height', 200); - $class = array_get($options, 'class', 'thumbnail'); + $server = \Arr::get($options, 'server'); + $width = \Arr::get($options, 'width', 200); + $height = \Arr::get($options, 'height', 200); + $class = \Arr::get($options, 'class', 'thumbnail'); $class = collect((array)$class)->map(function ($item) { return 'img-'. $item; })->implode(' '); From 957fff3a6020abfe8288e14633511698fb99adf5 Mon Sep 17 00:00:00 2001 From: jianmingLee Date: Wed, 11 Sep 2019 08:56:58 +0800 Subject: [PATCH 2/3] Update LightboxDisplayer.php --- src/LightboxDisplayer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LightboxDisplayer.php b/src/LightboxDisplayer.php index e6a1f3d..e7b4a25 100644 --- a/src/LightboxDisplayer.php +++ b/src/LightboxDisplayer.php @@ -51,7 +51,7 @@ public function display(array $options = []) return 'img-'. $item; })->implode(' '); - if (array_get($options, 'zooming')) { + if (\Arr::get($options, 'zooming')) { $this->zooming(); } From 48a5151f4c805f1b78caa7035acb6035f0adbc82 Mon Sep 17 00:00:00 2001 From: jianmingLee Date: Wed, 11 Sep 2019 09:01:53 +0800 Subject: [PATCH 3/3] use Illuminate\Support\Arr namespace --- src/LightboxDisplayer.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/LightboxDisplayer.php b/src/LightboxDisplayer.php index e7b4a25..5de926d 100644 --- a/src/LightboxDisplayer.php +++ b/src/LightboxDisplayer.php @@ -3,6 +3,7 @@ namespace Encore\Grid\Lightbox; use Encore\Admin\Admin; +use Illuminate\Support\Arr; use Encore\Admin\Grid\Displayers\AbstractDisplayer; use Illuminate\Support\Facades\Storage; @@ -43,15 +44,15 @@ public function display(array $options = []) $this->value = $this->value->toArray(); } - $server = \Arr::get($options, 'server'); - $width = \Arr::get($options, 'width', 200); - $height = \Arr::get($options, 'height', 200); - $class = \Arr::get($options, 'class', 'thumbnail'); + $server = Arr::get($options, 'server'); + $width = Arr::get($options, 'width', 200); + $height = Arr::get($options, 'height', 200); + $class = Arr::get($options, 'class', 'thumbnail'); $class = collect((array)$class)->map(function ($item) { return 'img-'. $item; })->implode(' '); - if (\Arr::get($options, 'zooming')) { + if (Arr::get($options, 'zooming')) { $this->zooming(); }