|
4 | 4 |
|
5 | 5 | use Encore\Admin\Admin; |
6 | 6 | use Encore\Admin\Grid\Displayers\AbstractDisplayer; |
| 7 | +use Illuminate\Contracts\Support\Arrayable; |
| 8 | +use Illuminate\Support\Arr; |
7 | 9 | use Illuminate\Support\Facades\Storage; |
8 | 10 |
|
9 | 11 | class LightboxDisplayer extends AbstractDisplayer |
@@ -43,15 +45,15 @@ public function display(array $options = []) |
43 | 45 | $this->value = $this->value->toArray(); |
44 | 46 | } |
45 | 47 |
|
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'); |
50 | 52 | $class = collect((array)$class)->map(function ($item) { |
51 | 53 | return 'img-'. $item; |
52 | 54 | })->implode(' '); |
53 | 55 |
|
54 | | - if (array_get($options, 'zooming')) { |
| 56 | + if (Arr::get($options, 'zooming')) { |
55 | 57 | $this->zooming(); |
56 | 58 | } |
57 | 59 |
|
|
0 commit comments