Skip to content

Commit

Permalink
兼容laravel 6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
z-song committed Oct 11, 2019
1 parent a19772d commit f8a247f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"providers": [
"Encore\\Grid\\Lightbox\\LightboxServiceProvider"
]

}
}
}
12 changes: 7 additions & 5 deletions src/LightboxDisplayer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

use Encore\Admin\Admin;
use Encore\Admin\Grid\Displayers\AbstractDisplayer;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Storage;

class LightboxDisplayer extends AbstractDisplayer
Expand Down Expand Up @@ -43,15 +45,15 @@ 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(' ');

if (array_get($options, 'zooming')) {
if (Arr::get($options, 'zooming')) {
$this->zooming();
}

Expand Down

0 comments on commit f8a247f

Please sign in to comment.