Download the PHP package jjdyo/j-laravel-media-manager without Composer
On this page you can find all versions of the php package jjdyo/j-laravel-media-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package j-laravel-media-manager
J-Laravel Media Manager
Laravel media library with a Vue 3 picker modal, upload with duplicate detection, directory browsing, and safe thumbnailing. Designed to be installed via Composer and integrated into your existing Laravel app.
Requirements
- PHP: ^8.1
- Laravel: ^10 | ^11 | ^12
- Intervention Image: ^2.7 | ^3.0
- Optional: spatie/laravel-permission (if you want role-based directory access)
Quick start
1) Install the package
2) Publish assets, config, and migrations (choose any/all tags)
3) Configure environment (optional defaults shown)
Add to your .env (or keep defaults from the config file):
4) Prepare storage and database
5) Routes are auto-registered
This package loads its routes for you (behind auth).
6) Frontend build
- We publish Vue components and a small composable to
resources/js/vendor/media-manager. - Import the components into your app and build with Vite as usual.
Example import and usage:
What you get
- Configurable directories (roots with labels) + dynamic subfolder scanning
- Optional role-guarded access per root (Spatie roles)
- Uploads with SHA‑256 duplicate detection (offers "use existing")
- Memory‑aware thumbnailing with safety limits (64px, 256px JPEG)
- Logs: dedupe hits, thumbnail preflight estimates, risk‑based skips, timings
- Folder creation with sanitized names and enforced nesting depth
- Vue 3 modal picker with Folder/All tabs, search, pagination, per‑page selector, upload with CSRF, duplicate handling
Configuration
File: config/media-manager.php (after publish)
max_file_size(e.g.,500KB,5MB,1GB)allowed_directories(root keys with labels)scan_depthandallowed_folder_nestthumbnails(sizes as[w,h,quality]),thumbnail_max_pixels,thumbnail_max_filesize_bytesdisk,visibilityenforce_spatie_permissionand per-rootpermissions
If you enable Spatie enforcement, only users with configured roles can use a root. Otherwise, any authenticated user can.
Getting started in your app
1) Add the CSRF meta tag to your layout so uploads succeed:
2) Show the picker and save the selection in a form
3) Store the relative path and compute the public URL server-side
See USAGE.md for full end-to-end examples (Trainer photo + Site logo), including validation rules and controller snippets.
Testing the installation
Use this quick checklist to verify everything is wired correctly:
- Visit
/mediaauthenticated; directories load and pagination works - Upload a large phone photo; a 256px thumbnail should appear and logs should show a thumbnail run
- Try uploading the same file again; you should see a duplicate detection flow
- Create a folder; name should be sanitized; depth limits respected
- If
MEDIA_ENFORCE_SPATIE=true, ensure roles restrict roots as expected
Frontend paths and Vite aliases
Assets are published to resources/js/vendor/media-manager. If your Vite alias @ points to resources/js, then imports like @/vendor/media-manager/components/media/MediaPicker.vue will work. Adjust paths if your alias differs.
Support & logging
Check storage/logs/laravel.log for detailed upload and thumbnail logs.
Packagist
License
MIT
All versions of j-laravel-media-manager with dependencies
laravel/framework Version ^10.0|^11.0|^12.0
intervention/image Version ^2.7|^3.0