Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filemanager Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Getting Started

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:

  1. composer.json — constraints, and whether thumbnailing pulls in intervention/image, GD, or Imagick.
  2. The service provider — what routes it registers, under which middleware, and what prefix. Run php artisan route:list | grep -i file immediately after install.
  3. config/filemanager.php (or equivalent) — disk name(s), root paths, image sizes.
  4. 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.

Implementation Patterns

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.

Gotchas and Tips

  • Maturity risk is the headline. 15 stars, pre-1.0, no release in over two years, and a release note consisting of "Pint & phpStan Pass." Pin the exact version, vendor-fork if you need a constraint bump, and budget for the day you replace it. Publish the views and config so your customizations survive composer update.
  • Unprotected routes are the most likely security finding. Confirm every registered route has auth middleware, and test path traversal explicitly — request /filemanager?path=../../.env and variants. The package must normalize; you must confirm it does.
  • Thumbnails fail silently. Missing GD/Imagick (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.
  • Generated thumbnails live somewhere. Find out where (same disk? a thumbs prefix? storage/app/...?) and include that path in your cleanup and backup routines, or you'll accumulate orphans forever.
  • No trash can. Deleting is almost certainly immediate and recursive for folders. If the UI is exposed to more than one trusted admin, put a scheduled backup or your own soft-delete/move-to-trash layer in front of it.
  • Large buckets hurt. A folder-tree UI typically enumerates eagerly; on S3 that's per-request list charges and multi-second loads. Scope the package to a subdirectory with a bounded file count rather than a shared bucket root.
  • Case sensitivity between macOS dev and Linux prod will bite on stored paths. Store and compare lowercased, normalized relative paths.
  • Extension points, in order of safety: config → published views/translations → container binding to override a service → forking. Reach for the last one only after the first three are exhausted.
  • Debugging: don't sprinkle 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.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
laravel2580/idehelpers
delatbabel/viewpages
anavel/gettext
muhamadrezaar/highcharts
delatbabel/keylists
frankkessler/salesforce-laravel-oauth2-rest
anavel/foundation
wdmtech/enviricons
eii/laravel-captcha
muka/shape-reader
tdt/json
refinery29/php-cs-fixer-config
hotmeteor/eco-env
mvaliolahi/hydrate
wearede/tbcpay-php
parsnick/steak
thibaud-dauce/mattermost-php
multilinguals/apollo-client
antaresbr/collection
kr0lik/phpstan-rules