dialloibrahima/laravel-model-media
A Laravel package for attaching media files to Eloquent models. Upload, store, and associate images or documents with your records through a simple, fluent API, keeping media handling clean and organized. Ideal for galleries, avatars, and file attachments.
Adopt when:
*_path column is the honest model.Look elsewhere when:
spatie/laravel-medialibrary or a hosted DAM instead.To executives: This is a small, MIT-licensed library that lets us ship file attachments on existing records without adding a table or a service. It's a weeks-not-quarters decision, it costs nothing to license, and because files are stored as ordinary model attributes, we can walk away from it later without a data migration. The tradeoff is that it's a young project with one maintainer — so we treat it as an internal utility, not a platform bet.
To engineering: One trait, one column, no service provider gymnastics, no extra queries. We isolate it behind a thin internal interface (attachFile / url / delete) so that swapping to a full media library later is a single adapter change rather than a refactor. Pin the version, add contract tests around upload/delete/orphan cleanup, and review the trait's source before it touches a production model — at 0 dependents we are effectively the QA. Recommend a fork-and-vendor fallback if maintenance stalls.
How can I help you explore Laravel packages today?