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
Rest Presenter

Rest Presenter Laravel Package

xtend-packages/rest-presenter

Lightweight Laravel presenter for REST APIs that transforms Eloquent models and collections into clean, consistent JSON responses using reusable presenter classes, with support for relationships, field filtering and pagination—keeping controllers thin and API output predictable.

View on GitHub
Deep Wiki
Context7

Kickstart your Laravel development with our API Starter Kits & Generators.

Frequently asked questions about Rest Presenter
What is xtend-packages/rest-presenter used for in Laravel?
It is a lightweight presenter layer for Laravel REST APIs that transforms Eloquent models and collections into clean, consistent JSON responses. Reusable presenter classes help keep controllers thin and make API output more predictable. The package supports relationships, field filtering, and pagination.
How do I install xtend-packages/rest-presenter with Composer?
Install it through Composer using the package name xtend-packages/rest-presenter and follow the package documentation for presenter setup. Run Composer updates in a branch or staging environment first so dependency resolution can be verified. For existing installs, version 1.1.3 is a patch-level compatibility update and no application code changes are expected.
Which Laravel and PHP versions does rest-presenter support?
The available release information does not list the full supported Laravel and PHP matrix, so confirm it against the package composer constraints and documentation before adoption. Version 1.1.3 specifically adds support for newer laravel/prompts versions, but it does not indicate changes to Laravel or PHP support. Validate your application’s Laravel, PHP, and laravel/prompts versions before upgrading.
Does rest-presenter 1.1.3 introduce breaking changes?
No breaking API changes, deprecations, or new product capabilities are indicated for 1.1.3. It is a patch-level dependency-compatibility update that adds support for newer laravel/prompts versions. Treat it as a low-risk maintenance release, but still run your API contract and integration tests before production rollout.
How do presenters handle Eloquent relationships in JSON responses?
The package supports relationships when transforming Eloquent models and collections into API responses. The exact presenter configuration and relationship-loading syntax should be confirmed in the package documentation. As with any Laravel API layer, verify eager loading to avoid unexpected N+1 query behavior.
Can I filter fields returned by a Laravel API presenter?
Yes, field filtering is part of the package’s stated feature set for shaping REST API output. This helps limit response payloads and keep JSON consistent across endpoints. Confirm the supported filtering configuration in the documentation and cover it with API contract tests.
Does rest-presenter support pagination for API collections?
Yes, pagination support is included for transforming collections into consistent REST API JSON responses. This can help standardize paginated output across Laravel endpoints. Validate the pagination metadata shape against your existing API contract during upgrades or adoption.
Is xtend-packages/rest-presenter safe to use in production?
The 1.1.3 release itself is low risk because it is a dependency-compatibility patch, but package-level risk remains unassessed without documentation, test coverage, release cadence, and maintainer history. Support risk is moderate until maintainer responsiveness, issue triage, and security practices are confirmed. Use a staging-first rollout, confirm the supported version matrix, and keep a Composer lockfile rollback path.
How should I test presenter output after upgrading to 1.1.3?
Update the package constraint in a branch, run Composer update, and execute your application’s API contract and integration tests. Verify console or command behavior if your application uses laravel/prompts interactively, since that dependency compatibility is the focus of this release. Promote through staging before production and roll back via the Composer lockfile if behavior changes unexpectedly.
What are alternatives to using a REST presenter package in Laravel?
Common alternatives include Laravel’s built-in API resources and custom response transformers, while xtend-packages/rest-presenter focuses on reusable presenter classes for consistent JSON output. It adds relationship, field filtering, and pagination support for REST responses. Compare the package’s documentation and test coverage against your existing API response conventions before standardizing on it.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections