solution-forest / filament-simplelightbox
This is my package filament-simplelightbox
Fund package maintenance!
SolutionForest
Requires
- php: ^8.1
- filament/filament: ^3.0
- filament/infolists: ^3.0
- filament/tables: ^3.0
- illuminate/contracts: ^10.0|^11.0
- spatie/laravel-package-tools: ^1.15.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- spatie/laravel-ray: ^1.26
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:
- VantagoAds: A self manage Ads Server, Simplify Your Advertising Strategy.
- GatherPro.events: A Event Photos management tools, Streamline Your Event Photos.
- Website CMS Management: Website CMS Management
Filament SimpleLightbox
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
You can install the package via composer:
composer require solution-forest/filament-simplelightbox
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
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.