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

Presenter Laravel Package

culturegr/presenter

Culturegr Presenter is a lightweight Laravel package for the presenter pattern. Wrap Eloquent models or plain data objects in presenter classes to keep formatting, computed values, and view logic out of models and controllers, with a clean, testable API.

View on GitHub
Deep Wiki
Context7

Eloquent Model Presenters for your Laravel app

Frequently asked questions about Presenter
What is Culturegr Presenter used for in Laravel?
Culturegr Presenter implements the presenter pattern for Laravel applications. It lets you wrap Eloquent models or plain data objects in presenter classes so formatting, computed values, and view logic stay out of models and controllers. The result is a cleaner, more testable API for preparing data for views or responses.
How do I install Culturegr Presenter with Composer?
Install the package with Composer using the culturegr/presenter package name. Then create presenter classes that wrap the Eloquent models or plain data objects you want to format. Adoption is code-level and does not require a database migration based on the package overview.
Does Culturegr Presenter support Laravel 13?
Yes, v1.7.0 adds Laravel 13 support as an additive compatibility update. The release is described as a minor, non-breaking change with no announced consumer-facing API, configuration, or view contract changes. You should still confirm the exact Laravel and PHP constraints in the package composer.json for your application.
Will upgrading to Culturegr Presenter 1.7.0 break existing code?
Version 1.7.0 is a minor release under semver, so it is intended to be non-breaking for existing consumers. The available assessment reports no announced changes to the consumer-facing API, configuration, or view contracts. Treat semver as a claim to validate by running your application test suite after widening the Composer constraint.
Can Culturegr Presenter wrap plain data objects or only Eloquent models?
The package is designed to wrap Eloquent models or plain data objects in presenter classes. That makes it usable for formatting model-backed data as well as simpler DTOs or arrays of prepared values. The presenter remains the place for formatting and computed values rather than the underlying data object.
How do I test presenter classes in a Laravel application?
Presenter classes are ordinary PHP classes with a clean, testable API, so you can unit test their methods directly with sample models or data objects. Add feature tests for the controllers and views that consume presenters to confirm the rendered output. After a package upgrade, run the full suite and pay particular attention to any listing routes that use pagination or query strings.
Where should formatting and computed values live when using presenters?
Formatting, computed values, and view-specific logic should live in presenter classes rather than Eloquent models or controllers. The presenter wraps the model or data object and exposes a focused API for the view or response layer. This keeps models lean and controllers free of presentation concerns.
Does Culturegr Presenter handle Laravel pagination or paginated listings?
The package overview describes Eloquent model presenters, not pagination replacement or pagination view rendering. If your application uses Laravel pagination on filtered listings, verify query-string preservation and rendered pagination separately during integration. Do not assume the presenter package owns paginator behavior without checking the repository documentation.
What are alternatives to Culturegr Presenter for Laravel?
Alternatives include Laravel accessors and mutators, API resources for response shaping, dedicated view-model or presenter packages, and simple transformation classes in your application. Choose based on how much formatting and computed logic you need to keep out of models and controllers. Culturegr Presenter is a lightweight option when you specifically want the presenter pattern.
Is Culturegr Presenter maintained and safe for production use?
The v1.7.0 release shows the package tracking new Laravel versions, including Laravel 13, with an internal test update and no announced consumer-facing breaks. That is a positive maintenance signal, but you should still review the GitHub release history and CI results for your required Laravel and PHP versions. For production, run your application tests and exercise representative presenter-backed pages before deploying.
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.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core