yurizoom / moonshine-media-manager
Media manager for MoonShine
Package info
github.com/yurizoom/moonshine-media-manager
pkg:composer/yurizoom/moonshine-media-manager
4.7.2
2026-09-13 03:50 UTC
Requires
- php: ^8.2
- moonshine/moonshine: ^4.0
Requires (Dev)
- orchestra/testbench: ^10.0
- phpunit/phpunit: ^11.5
Suggests
None
Provides
None
Conflicts
- moonshine/moonshine: <4.0
Replaces
None
README
English | Русский
A file manager for MoonShine.
Version support
| MoonShine | Package | Documentation |
|---|---|---|
| 4.0+ | 4.x | Below ↓ + docs/ |
| 4.0+ | 3.x | docs/legacy-versions.md |
| 3.0+ | 2.x | docs/legacy-versions.md |
| 2.0+ | 1.x |
Screenshots
| Manager | Picker |
![]() |
![]() |
Installation
composer require yurizoom/moonshine-media-manager php artisan vendor:publish --tag=moonshine-media-manager-assets php artisan vendor:publish --tag=moonshine-media-manager-config
Add the OffCanvas to your layout and — optionally — a menu item: Getting started.
Quick example: picker field in a form
use YuriZoom\MoonShineMediaManager\Fields\MediaManagerPicker; // Single image MediaManagerPicker::make('Image', 'image') ->allowedTypes(['image']), // Multiple selection MediaManagerPicker::make('Gallery', 'images') ->multiple() ->allowedTypes(['image']),
Works with regular fields, Json and Layouts — details.
v4 features
- AJAX navigation — browse folders without page reloads
- Search / filter / sort — instant search by name, type filter, sort by name / date / size
- Hide converted formats — "Hide WebP/AVIF" toggle, state persisted in localStorage
- Uploads — multiple files with MIME, extension and size validation; drag-and-drop inside the upload modal
- Replace file — overwrite in place, the URL stays the same
- Move file — relocate via the folder browser
- Folders / rename / bulk delete / download
- File URL — view and copy the link
- Inline validation — errors right inside the modals, fully localized (en/ru)
- Two views — table and grid
- Table row hover — dark-mode aware highlight
- Delete keeps your position — the list scrolls to and highlights the nearest surviving row
- Picker remembers the folder — reopens where you left it
- Lazy offcanvas — admin pages that never open the manager fire no extra requests
- Lazy-load previews — thumbnails load on scroll
- Cache-busting — images refresh automatically after Replace
- Picker field — pick files straight from your forms (multiple, filters enforced on upload too, drag-and-drop reorder)
- Layouts / Json — full integration with moonshine/layouts-field and Json fields
- Extensibility — events (Uploaded/Replaced/Deleted — dispatched per file, even inside deleted folders) and an action registry for third-party packages
- Guaranteed modal layers — the manager always floats above foreign overlays (z-index)
- Tested — 42 tests (PHPUnit + Testbench), CI matrix PHP 8.2/8.3
Documentation
Guides are available in English and Russian (*.ru.md).
| Guide | Description |
|---|---|
| Getting started · RU | Publishing, OffCanvas, menu, verification |
| Configuration · RU | Options, ENV, authorization, z-index layers |
| MediaManagerPicker field · RU | Filtering, Json, Layouts, behavior |
| API & events · RU | Routes, JSON contract, events, registry |
| Development · RU | Asset builds, package integration |
| Legacy versions · RU | v3 (MoonShine 4) and v2 (MoonShine 3) setup |

