solution-forest/filament-simplelightbox 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

solution-forest/filament-simplelightbox

最新稳定版本:1.0.0

Composer 安装命令:

composer require solution-forest/filament-simplelightbox

包简介

This is my package filament-simplelightbox

README 文档

README

About Solution Forest

Solution Forest Web development agency based in Hong Kong. We help customers to solve their problems. We Love Open Soruces.

We have built a collection of best-in-class products:

  • InspireCMS: A full-featured Laravel CMS with everything you need out of the box. Build smarter, ship faster with our complete content management solution.
  • Filaletter: Filaletter - Filament Newsletter Plugin
  • Website CMS Management: A hands-on Filament CMS plugin for those who prefer more manual control over their website content management.

Filament SimpleLightbox

Latest Version on Packagist Total Downloads

Description

Filament SimpleLightbox is a PHP package that provides a simple and lightweight solution for implementing a lightbox feature in your Filament admin panel. It allows you to easily preview Image, PDF and Office documents within your Filament.

Features

  • Integration with the fslightbox JavaScript library for the lightbox functionality.
  • Supports previewing PDF and Office documents. information
  • Easy installation and usage.

Installation

Filament Version Filament Simple Light Box Version
v3.x v0.x
v4.x v1.x

You can install the package via composer:

composer require solution-forest/filament-simplelightbox

Publish the assets:

php artisan filament:assets
php artisan optimize

Usage

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugin(SimpleLightBoxPlugin::make())
}
Tables\Columns\ImageColumn::make('image')
                    ->simpleLightbox()
Tables\Columns\TextColumn::make('pdf_url')
                    ->simpleLightbox("Your Url address"),

You can pass parameter to generate url, also the url can be used as default value (defaultDisplayUrl default is true):

Tables\Columns\ImageColumn::make('image')
    ->simpleLightbox(fn ($record) =>  $record?->image ?? "Your Image Url address", defaultDisplayUrl: true),
Tables\Columns\TextColumn::make('url')
    ->simpleLightbox(fn ($record) =>  $record?->image ?? "Your Image Url address", defaultDisplayUrl: true),
InfoLists\Components\ImageEntry::make('image')
    ->simpleLightbox(fn ($record) =>  $record?->image ?? "Your Image Url address", defaultDisplayUrl: true),
Tables\Columns\ImageColumn::make('image')
    ->simpleLightbox(fn ($record) =>  $record?->image ?? "Your Image Url address", defaultDisplayUrl: true),

Preview

demo.mov

image_preview url_preview docx_preview pptx_preview

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 65.47k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 62
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 62
  • Watchers: 2
  • Forks: 14
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-11-17