laravel-admin-extensions / grid-lightbox Goto Github PK
View Code? Open in Web Editor NEWTurn your grid into a lightbox & gallery
License: MIT License
Turn your grid into a lightbox & gallery
License: MIT License
I have field with filename of picture.
Pictures located in /public/img/news directory.
But when I add ->lightbox();
in the end of line then result path is http://localhost/storage//img/news/new-shower-hinges.jpg
$grid->column('image', 'Image')->display(function ($name) {
return "/img/news/$name";
})->lightbox();
Is it possible to fix that without changing code of vendor LightboxDisplayer?
$grid->column('card', '备注')->display(function($card){
if($card->type==1){
return "文字";
}else{
return $card->lightbox(...);
}
});
display里面判断使用哪种效果
本地可以使用,服务器会报错,错误内容 :Method Illuminate\Support\Collection::lightbox does not exist.
$grid->column('picture', '截图')->image('http://xxx/', 100, 100);
有参数列表没?
I could apply lightbox to grid element like that and it works
$grid->column('image', 'Picture')->display(function ($name) {
return "/img/news/$name";
})->lightbox();
But I cannot understand how to apply that to show field. Same principle doesn't work.
$show->field('image', __('Image'))->display(function ($name) {
return "/img/news/$name";
})->image()->lightbox();
How can use light box for PDF?
[InvalidArgumentException]
Could not find package laravel-admin-ext/grid-lightbox at any version for
your minimum-stability (stable). Check the package spelling or your mini
mum-stability
google is not help this.
需要适配一下6.0
$grid->column( 'wx_avatar_url' , __( '微信头像' ) )->image( config( 'myconfig.config.API_URL' ).'uploads' ,50,50)->lightbox();
这样的情况下,图片不显示了,而且增加了 HTML代码在页面上。
Thank you
When using with grid, if there is a blank line of URL, an error occurs.
InvalidArgumentException In Validator.php line 65:
↓
if (url () -> isValidUrl ($ this -> value)) {
详情图片能放大吗
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.