diff --git a/src/LightboxDisplayer.php b/src/LightboxDisplayer.php index 7cf8efa..d279ce0 100644 --- a/src/LightboxDisplayer.php +++ b/src/LightboxDisplayer.php @@ -48,6 +48,7 @@ public function display(array $options = []) $server = Arr::get($options, 'server'); $width = Arr::get($options, 'width', 200); $height = Arr::get($options, 'height', 200); + $title = Arr::get($options, 'title', ''); $class = Arr::get($options, 'class', 'thumbnail'); $class = collect((array)$class)->map(function ($item) { return 'img-'. $item; @@ -59,7 +60,7 @@ public function display(array $options = []) Admin::script($this->script()); - return collect((array)$this->value)->filter()->map(function ($path) use ($server, $width, $height, $class) { + return collect((array)$this->value)->filter()->map(function ($path) use ($server, $width, $height, $class, $title) { if (url()->isValidUrl($path) || strpos($path, 'data:image') === 0) { $src = $path; } elseif ($server) { @@ -70,7 +71,7 @@ public function display(array $options = []) return << - + HTML; })->implode(' ');