Download the PHP package minemindmedia/laravel-mmmedia without Composer
On this page you can find all versions of the php package minemindmedia/laravel-mmmedia. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download minemindmedia/laravel-mmmedia
More information about minemindmedia/laravel-mmmedia
Files in minemindmedia/laravel-mmmedia
Package laravel-mmmedia
Short Description A Laravel package providing a global media library and Filament MediaPicker field
License MIT
Homepage https://github.com/minemindmedia/laravel-mmmedia
Informations about the package laravel-mmmedia
Laravel MMMedia
A comprehensive Laravel package that provides a global media library and Filament MediaPicker field for managing media assets in your Laravel applications.
Features
- 🖼️ Global Media Library - Centralized media management with Filament admin interface
- 📁 MediaPicker Field - Easy-to-use Filament form component for media selection
- 🔗 Usage Tracking - Track where media items are used across your application
- 📤 File Upload - Direct upload support with drag & drop
- 🎨 Multiple File Types - Support for images, videos, and documents
- 🔄 Reordering - Reorder media items in galleries
- 🏷️ Metadata - Alt text, titles, captions, and custom metadata
- 💾 Flexible Storage - Works with any Laravel filesystem (local, S3, etc.)
- 🎯 Model Integration - Easy integration with any Eloquent model
- 🚀 Filament v4 Compatible - Native support for Filament v4
- 📚 Spatie MediaLibrary Integration - Works with or without Spatie MediaLibrary
- 🖼️ Thumbnail Generation - Automatic thumbnail generation with Intervention Image
Installation
Option 1: Install from Packagist (Recommended)
Option 2: Install directly from GitHub
Add the repository to your composer.json:
Then install:
Publish the configuration file:
Publish and run the migrations:
Quick Start
-
Add the trait to your model:
-
Use MediaPicker in your Filament form:
- Access the Media Library: Visit your Filament admin panel and you'll see a new "Media" section where you can manage all media items.
Filament v4 Compatibility
This package is 100% natively compatible with Filament v4! No vendor patches required.
🎉 Complete native Filament v4 support achieved in v1.1.3!
Note: If you're using a custom MediaItem model, make sure the
generateThumbnail()method is public to avoid visibility conflicts.
Using with Spatie MediaLibrary
If you're already using Spatie MediaLibrary, the MediaPicker will automatically detect and work with your existing media:
Using with Package's Media System
If you prefer to use the package's built-in media system:
Custom MediaItem Model
If you need to customize the MediaItem model, you can create your own and disable automatic binding:
Then create your custom model:
Configuration
The package configuration is located in config/media.php. Here are the key settings:
Usage
1. Add the Trait to Your Models
Add the HasMediaAttachments trait to any model that needs media functionality:
2. Use the MediaPicker in Filament Forms
3. Working with Media in Your Code
4. MediaPicker Configuration Options
The MediaPicker component supports various configuration options:
Media Library Admin
The package automatically registers a MediaItemResource in your Filament admin panel. You can:
- Browse all media items in a grid or list view
- Upload new media files
- Edit metadata (alt text, title, caption)
- View usage information
- Delete unused media items
- Filter by file type, usage status, etc.
API Endpoints
The package provides API endpoints for programmatic access:
Advanced Usage
Custom Storage Paths
You can customize where different file types are stored:
Thumbnail Generation
The package supports thumbnail generation for images:
Usage Tracking
The package automatically tracks where media items are used:
Events
The package fires events when media items are created, updated, or deleted:
Thumbnail Generation
The package supports automatic thumbnail generation using Intervention Image:
Install Intervention Image (Optional)
Generate Thumbnails
Custom Thumbnail Configuration
You can configure thumbnail generation in config/media.php:
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- MineMind Media
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Support
For support, please email [email protected] or create an issue on GitHub.
Auto-update test
All versions of laravel-mmmedia with dependencies
laravel/framework Version ^10.0|^11.0|^12.0
filament/filament Version ^3.0|^4.0
spatie/laravel-medialibrary Version ^10.0|^11.0
livewire/livewire Version ^3.0|^4.0