hemp/presenter
Hemp Presenter is a lightweight Laravel package for wrapping models or data in dedicated presenter classes, giving you a clean place for display formatting, computed fields, and view-ready output while keeping your models and controllers lean.
Verdict: Adopt conditionally. The package is a thin, MIT-licensed convenience wrapper around a pattern most Laravel teams re-implement by hand, so technical risk is low but so is strategic upside. Its value is convention enforcement, not capability. Treat it as a pattern library we can fork, not a platform dependency.
Architecture fit
Presentable trait on Eloquent models exposes present(), returning a presenter class that formats model attributes for the view layer. This is additive — no service provider gymnastics, no schema, no query interception.Integration feasibility
composer require hemp/presenter, one trait on one model, one presenter class, one Blade call site.Technical risk
illuminate/* constraints unsatisfiable. Since the package touches stable Eloquent/container APIs, a fork patch is typically a composer.json bump.Key questions for the maintainer / internal spike
present() memoize the presenter instance per model instance, or instantiate on every call? (Determines whether calling it repeatedly in a Blade loop is free.)toArray()/JSON serialization, or is presenter output strictly view-layer? We must not silently change API payloads.Stack fit
laracasts/presenter or hand-rolled accessors). Two coexisting presenter idioms is worse than either one alone.Migration path
App\Presenters\Presenter extending the vendor base class and require all presenters to extend ours. This buys us a single swap point if upstream breaks or we fork.User, Invoice) with a small number of call sites. No API surface touched. Measure developer reaction and diff size.Compatibility and sequencing
composer.json and rely on Dependabot/Renovate to surface upstream releases for review rather than auto-merging them.app/Support/Presenter or a path repository under MIT and remove the external dependency entirely. At this code size, vendoring is a legitimate first-choice option, not a fallback.Maintenance
Support
Scaling
$this->model->relation->field, which converts a clean eager-loaded page into an N+1 storm that's invisible in code review. Enforce the no-relations rule or add a query-count assertion in tests.Failure modes
toArray() paths and covering with a contract test.{!! !!} requires review.Ramp-up
How can I help you explore Laravel packages today?