mabrouk/mediable
mabrouk/mediable is a small Laravel package for attaching media files to Eloquent models. It is low-adoption and sparsely documented, so expect to read the source. Best suited to simple upload and association needs; evaluate stability before production use.
url when the media type is url). If our API contracts expose media payloads to clients or third parties, this affects response shape and must be reviewed before we commit to a public schema or publish API docs.load_routes config key lets us decide whether the package registers its own routes. This is a product decision as much as a technical one — it determines whether endpoint paths are ours to define (and version) or owned upstream, which affects our public API versioning strategy and any customer-facing documentation.Consider it when:
load_routes and writing our own controllers.Look elsewhere when:
Pre-adoption checklist for engineering: confirm the config file has been republished and load_routes set deliberately; diff media resource output against our current expectations; verify no code extends the classes whose method signatures are now typed.
For executives: This is a maintained Laravel package that would supply our media/attachment plumbing instead of us building it. The latest release (4.0.2) is small in scope but tells us two things: the maintainer is actively modernizing the codebase, and upgrades require occasional manual configuration work. Net: modest build-cost savings, with a small ongoing maintenance tax — not free, but cheaper than owning the domain.
For engineering: Version 4.0.2 adds a load_routes config key (must be added to the published config — this is a required manual step), converts method parameters and returns to explicit types, and stops calling url on media resources for URL-type media. The typing refactor may break any subclass or extension of these classes; the resource change may alter API response shape. Recommend we trial it in a spike, publish and review the full config, and confirm serialized output matches our contract before committing. Treat patch-level upgrades as needing a changelog review, not blind composer update.
How can I help you explore Laravel packages today?