Download the PHP package gheith3/filament-file-view-entry without Composer
On this page you can find all versions of the php package gheith3/filament-file-view-entry. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gheith3/filament-file-view-entry
More information about gheith3/filament-file-view-entry
Files in gheith3/filament-file-view-entry
Package filament-file-view-entry
Short Description A Filament plugin for displaying file attachments with type-specific icons and modal preview
License MIT
Homepage https://github.com/gheith3/FileViewEntryPlugin
Informations about the package filament-file-view-entry
Filament File View Entry
A Filament plugin that provides a beautiful file attachment viewer for Infolists with type-specific icons, modal previews, and responsive grid layout.
Features
- 🎨 Beautiful card layout with file type icons
- 🔍 Modal preview for images, videos, audio, PDFs, and text files
- 📱 Responsive grid - auto-adjusts columns based on screen size
- 🌙 Dark mode support
- 📥 Download option
- 🔧 Customizable data keys - works with any data structure
- 📦 Collection support - works with Eloquent relationships
Installation
Quick Start
Register the Plugin
In your panel provider:
CSS Configuration (Custom Theme)
If your panel uses a custom theme registered in vite.config.js, add the following line to your theme's CSS file:
Then recompile your assets:
Note: This step is only required when using a custom Vite theme. The plugin works out of the box with Filament's default setup.
Basic Usage
Configuration
Data Structure Mapping
If your data uses different keys:
Available Methods
| Method | Description |
|---|---|
grid(int $columns) |
Set grid columns (1-6, auto-responsive) |
titleKey(string $key) |
Key for file title |
pathKey(string $key) |
Key for file path |
dateKey(?string $key) |
Key for date (null to hide) |
asModal(bool $enabled) |
Show content in modal (default: true) |
withModalEye(bool $enabled) |
Add eye button for modal preview when asModal(false) |
showAsLink(bool $enabled) |
Show as compact list (default: false) |
contained(bool $enabled) |
Show background/border (default: true) |
lazyLoad(bool $enabled) |
Lazy load images (default: false) |
showFileSize(bool $enabled) |
Show file size (default: false) |
showFileCount(bool $enabled) |
Show file count badge (default: false) |
loadingSkeleton(bool $enabled) |
Show loading skeleton (default: false) |
copyable(bool $enabled) |
Add copy link button (default: false) |
customIcons(array $icons) |
Custom icons for file types/extensions |
disk(string $disk) |
Storage disk name |
downloadable(bool $enabled) |
Show download button |
previewHeight(int\|string $height) |
Modal height (default: 300px) |
Grid Columns Reference
Examples
With Eloquent Relationship
Custom Data Array
Display Modes
The plugin supports three display modes:
1. Card Grid (Default)
Files displayed as cards in a grid. Click to open modal.
2. Compact List
Files displayed as a simple list (icon + filename). Click to open modal.
3. Inline Display
Files displayed directly on the page with full preview.
4. Inline with Modal Preview Button
When using asModal(false), you can add an eye button that opens a modal preview:
This shows the file content directly on the page, but adds an 👁️ (eye) icon next to the download button. Clicking the eye opens the file in a modal for larger preview.
5. Remove Background and Border
Use contained(false) to remove the background and border from cards:
This is useful when you want a cleaner look or when nesting inside other containers.
Additional Features
Lazy Loading Images
Improve page performance by lazy loading images:
Show File Size
Display file size next to the filename:
File Count Badge
Show a badge with the total number of files:
Loading Skeleton
Show skeleton placeholders while files are loading:
Copy Link Button
Add a copy button to copy the file URL to clipboard:
Custom Icons
Override default icons for specific file types or extensions:
Extension-specific icons take precedence over file type icons.
Customization
Publish Views
Edit resources/views/vendor/file-view-entry-plugin/infolists/components/file-view-entry.blade.php
Screenshots
Grid Layout with File Type Icons
Modal Preview - Image
Modal Preview - Text Files
Modal Preview - Audio
Supported File Types
| Type | Extensions | Preview |
|---|---|---|
| Image | jpg, jpeg, png, gif, bmp, svg, webp | ✓ |
| Video | mp4, mov, avi, mkv, webm, flv, wmv | ✓ |
| Audio | mp3, wav, ogg, flac, aac, m4a | ✓ |
| ✓ | ||
| Text | txt, md | ✓ |
| Other | * | Opens in new tab |
Requirements
- PHP ^8.2
- Laravel ^11.0 || ^12.0
- Filament ^4.0 || ^5.0
License
The MIT License (MIT). Please see License File for more information.
Credits
- Created by Gheith
- Inspired by the Filament community
Support
All versions of filament-file-view-entry with dependencies
filament/filament Version ^4.0|^5.0
illuminate/contracts Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0