cleaniquecoders/media-manager
Composer 安装命令:
composer require cleaniquecoders/media-manager
包简介
Spatie Media Library Manager
README 文档
README
A Laravel package that provides a complete media management solution built on top of Spatie Media Library. Manage your media files through a modern, user-friendly interface with Livewire components.
Features
- Full-featured media browser with grid and list views
- Drag-and-drop file uploads with progress tracking
- Media collection management with reordering support
- Media picker for selecting existing files
- Search, filter, and bulk operations
- Custom properties and metadata support
- Authorization via Laravel gates
- Fully customizable views
Screenshots
Media Browser
Browse all your media files with filtering, searching, and bulk operations.
Media Uploader
Upload files to any model with drag-and-drop support.
Media Collection
Manage media collections inline with drag-and-drop reordering.
Installation
Install the package via Composer:
composer require cleaniquecoders/media-manager
Run the install command:
php artisan media-manager:install
Or manually publish and run migrations:
php artisan vendor:publish --tag="media-manager-migrations"
php artisan migrate
Optionally publish the config file:
php artisan vendor:publish --tag="media-manager-config"
Quick Start
1. Add the trait to your model
<?php namespace App\Models; use CleaniqueCoders\MediaManager\Concerns\HasMediaManager; use Illuminate\Database\Eloquent\Model; use Spatie\MediaLibrary\HasMedia; class Post extends Model implements HasMedia { use HasMediaManager; public function registerMediaCollections(): void { $this->addMediaCollection('featured')->singleFile(); $this->addMediaCollection('gallery'); } }
2. Add components to your views
{{-- Media Browser - embed in your own view with your layout --}} <livewire:media-manager::browser /> {{-- Media Uploader --}} <livewire:media-manager::uploader :model="$post" collection="gallery" :max-files="10" /> {{-- Media Collection Editor --}} <livewire:media-manager::collection :model="$post" collection="gallery" sortable /> {{-- Media Picker --}} <livewire:media-manager::picker wire:model="selectedMediaIds" multiple />
3. Create a route for the media browser
Create your own route and view to display the browser:
// routes/web.php Route::get('/media', function () { return view('media'); })->middleware(['web', 'auth']);
{{-- resources/views/media.blade.php --}} <x-app-layout> <livewire:media-manager::browser /> </x-app-layout>
Using the Facade
use CleaniqueCoders\MediaManager\Facades\MediaManager; // Upload files MediaManager::upload($model, $file, 'collection'); MediaManager::uploadMultiple($model, $files, 'collection'); // Browse with filters $media = MediaManager::browse(['collection' => 'gallery'], perPage: 24); // Delete media MediaManager::delete($media); MediaManager::deleteMultiple([1, 2, 3]);
Documentation
For detailed documentation, see the docs directory:
- Getting Started - Installation and setup
- Components - All Livewire components
- Configuration - Configuration options
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.
cleaniquecoders/media-manager 适用场景与选型建议
cleaniquecoders/media-manager 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 01 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「media-manager」 「Cleanique Coders」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 cleaniquecoders/media-manager 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cleaniquecoders/media-manager 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 cleaniquecoders/media-manager 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Symfony Media manager bundle for EasyAdmin
Laravel media manager
A media manager plugin for Filament.
Provide organization related app
Effortlessly manage your Laravel API versions with flexible, header-based versioning control.
A media manager to upload media files to multiple storages or select image from Unsplash, URL
统计信息
- 总下载量: 2k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 16
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-20


