toneflix-code/laravel-fileable
Laravel Fileable adds simple file attachments to Eloquent models. Upload, store, and associate files with any model through a clean API, with support for multiple files, custom storage disks, and automatic cleanup of orphaned uploads in your Laravel apps.
spatie/laravel-medialibrary)." Frame the evaluation that way and this package becomes one candidate in a bake-off rather than a binary bet.Storage calls if the package stalls.Consider it when:
composer.json rather than the README.AttachmentService) so the package is an implementation detail, not a public API in your codebase.Look elsewhere when:
srcset, S3 multipart/chunked uploads, virus scanning, signed/temporary URLs, CDN purge, EXIF stripping — go to spatie/laravel-medialibrary or build on Flysystem directly. Retrofitting these onto a thin upload helper is rework, not extension.Storage plus MorphMany covers the common case in well under 100 lines. If the package saves you 30 lines but adds a dependency, a fork obligation, and an upgrade-surface, the abstraction has not paid for itself.Diligence checklist before any adoption: verify Laravel/PHP version constraints; confirm the future-dated release is real and not a tagging artifact; check commit history and last-commit recency; read the trait for path sanitization, MIME/extension validation delegation, and disk/visibility defaults; confirm deletion actually removes the underlying object and not just the DB row; check whether it respects Storage::disk() config or hardcodes.
To executives (one paragraph): This is a small, MIT-licensed Laravel helper that reduces engineering effort on file-upload features. The upside is modest but real — less custom code per media feature and fewer places for upload bugs to hide. The downside is adoption risk: essentially no community usage and an unproven maintenance record. My recommendation is a time-boxed two-day spike, not a platform commitment. It costs little to evaluate, and because the license permits it, we retain the option to fork or replace it. It should not be adopted for anything touching regulated data until a security review clears it.
To engineering: The package offers filesystem helpers plus a trait that auto-handles uploads on model save. The evaluation is a three-way bake-off: this package, a ~100-line internal HasUploads trait built on Storage, and spatie/laravel-medialibrary if media requirements are broader than we currently think. Score each on: lines of code removed, readability, testability, deletion/cleanup correctness, disk-configurability, and swap-out cost. If we adopt, wrap it in our own interface, pin the version, vendor it, and treat it as an implementation detail — never let its API leak into controllers or Blade. Flag explicitly whether the trait validates extension and MIME type or silently trusts the client.
Recommendation: Candidate accelerator for non-critical attachment features. Run the spike, decide against the alternatives on measured boilerplate reduction rather than stars, and default to "no" if the media requirements are anything beyond simple polymorphic attachments.
How can I help you explore Laravel packages today?