Skip to content

Commit f8a247f

Browse files
committed
兼容laravel 6.0
1 parent a19772d commit f8a247f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"providers": [
2929
"Encore\\Grid\\Lightbox\\LightboxServiceProvider"
3030
]
31-
3231
}
3332
}
3433
}

src/LightboxDisplayer.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
use Encore\Admin\Admin;
66
use Encore\Admin\Grid\Displayers\AbstractDisplayer;
7+
use Illuminate\Contracts\Support\Arrayable;
8+
use Illuminate\Support\Arr;
79
use Illuminate\Support\Facades\Storage;
810

911
class LightboxDisplayer extends AbstractDisplayer
@@ -43,15 +45,15 @@ public function display(array $options = [])
4345
$this->value = $this->value->toArray();
4446
}
4547

46-
$server = array_get($options, 'server');
47-
$width = array_get($options, 'width', 200);
48-
$height = array_get($options, 'height', 200);
49-
$class = array_get($options, 'class', 'thumbnail');
48+
$server = Arr::get($options, 'server');
49+
$width = Arr::get($options, 'width', 200);
50+
$height = Arr::get($options, 'height', 200);
51+
$class = Arr::get($options, 'class', 'thumbnail');
5052
$class = collect((array)$class)->map(function ($item) {
5153
return 'img-'. $item;
5254
})->implode(' ');
5355

54-
if (array_get($options, 'zooming')) {
56+
if (Arr::get($options, 'zooming')) {
5557
$this->zooming();
5658
}
5759

0 commit comments

Comments
 (0)