laravel-admin light-box扩展
Clone or download
Latest commit 7b11c2b Dec 18, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
resources/assets init Dec 18, 2018
src change name Dec 18, 2018
.gitignore init Dec 18, 2018
LICENSE init Dec 18, 2018
README.md 添加预览 Dec 18, 2018
composer.json 修改包名 Dec 18, 2018

README.md

laravel-admin 列表图片浏览扩展

  • 单图浏览
  • 多图浏览

安装

composer require smallruraldog/light-box

发布资源

php artisan vendor:publish --provider=SmallRuralDog\LightBox\LightBoxServiceProvider

配置

'extensions' => [
    'light-box' => [
        // Set to `false` if you want to disable this extension
        'enable' => true,
    ]
 ]

使用方法

// simple lightbox
$grid->picture()->lightbox();

//gallery
$grid->picture()->gallery();

//zoom effect
$grid->picture()->lightbox(['zooming' => true]);
$grid->picture()->gallery(['zooming' => true]);

//width & height properties
$grid->picture()->lightbox(['width' => 50, 'height' => 50]);
$grid->picture()->gallery(['width' => 50, 'height' => 50]);

当字段为数组时为多图浏览

预览

image

image

License

Licensed under The MIT License (MIT).