webplusmultimedia/filemanager
A file manager package for Laravel that provides a ready-made interface for browsing, uploading, and organizing files and media. Useful for adding file picking and management to admin panels, CMS-style apps, or editors without building your own UI.
Before you install, check compatibility. The last release is V0.9.9 (March 2023) and the package has never hit 1.0, so the Laravel constraint in its composer.json almost certainly predates Laravel 11/12. Verify before committing:
composer show -a webplusmultimedia/filemanager # inspect requires, php + illuminate/* constraints
composer require webplusmultimedia/filemanager
If the constraint blocks a modern Laravel, decide early between pinning an older Laravel, using a fork with a widened constraint, or choosing a maintained alternative. Don't discover this after wiring the UI into an admin panel.
Publish and read, in this order. Run the interactive publisher rather than guessing the provider FQCN:
php artisan vendor:publish # pick the package's tagged entries (config, views, assets, migrations)
php artisan storage:link # required if previews resolve via the public disk
Then read these four things before writing any integration code — for a package at this maturity, the source is the documentation:
composer.json — constraints, and whether thumbnailing pulls in intervention/image, GD, or Imagick.php artisan route:list | grep -i file immediately after install.config/filemanager.php (or equivalent) — disk name(s), root paths, image sizes.resources/views — whether the browser ships as a full page (@extends) or a partial, and whether it uses mix() (a Laravel 10+/Vite breakage signal).First use case: put it behind auth in an internal admin panel, pointed at a dedicated disk rooted at a subdirectory such as storage/app/public/media. Use it as a media library/picker for trusted staff. Do not expose it to end users, and do not leave the shipped routes ungated — verify with route:list and a logged-out request that the package didn't register public routes by default.
Give it its own disk. Define a media disk in config/filesystems.php rooted at a subdirectory, and point the package config at it. Never aim it at the root of public or local — the delete action is destructive, and a folder-tree UI over your app's storage root is an outage waiting to happen.
Treat it as UI-only; keep your own persistence. The browser gives you paths, not domain objects. Store the returned relative path on your own model ($post->image_path), and resolve URLs yourself. This is the cheapest insurance against the package being abandoned.
Serving files from non-public disks. For S3 or private local disks, don't rely on a public URL. Add a route that streams through Laravel's filesystem layer, keyed by the stored relative path:
Route::get('/media/{path}', fn ($path) => Storage::disk('media')->response($path))
->where('path', '.*')->middleware('auth');
Gate the routes yourself. The package registers its own routes, so instead of editing vendor code, wrap them: check the provider for a config-driven prefix/middleware, or re-register the package's route file inside your own Route::middleware(['auth', 'can:manage-media'])->group(...) in a service provider. Apply authorization once, centrally.
Uploads need your validation, not theirs. Add a middleware or a wrapper controller that enforces max size, allowed MIME types, and (for images) re-encoding through intervention/image before it hits the disk. Assume the package accepts what the browser sends.
Post-upload consistency. If the package fires events, listen. If not, reconcile with a scheduled command using the disk abstraction — Storage::disk('media')->allFiles() — and diff against your DB index. That keeps the media table accurate even when files are deleted out-of-band.
Testing. Storage::fake('media') works for anything that goes through the filesystem abstraction, which per the package's own description is everything. Feature tests around the endpoints are worth writing precisely because upstream has no test suite to lean on.
composer update./filemanager?path=../../.env and variants. The package must normalize; you must confirm it does.php -m) or an S3 bucket without write permission yields broken images and no error. On local disks, a missing storage:link produces the same symptom. Check the network tab before assuming a config problem.thumbs prefix? storage/app/...?) and include that path in your cleanup and backup routines, or you'll accumulate orphans forever.Log::debug into published views. Use the browser network tab for the XHR endpoints, and verify path expectations directly with Storage::disk('media')->exists($path) in tinker — a leading slash or a missing subdirectory prefix is the cause of most "file not found but it's clearly there" reports.How can I help you explore Laravel packages today?