PHPackages                             anasa/response-strategy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. anasa/response-strategy

ActiveLibrary[API Development](/categories/api)

anasa/response-strategy
=======================

Package to isolate the logic that determines the return type of the controller based on the source (API/Web)

v1.0.4(1y ago)063PHPPHP ^8.0

Since Sep 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/magerosco/anasa-response-strategy)[ Packagist](https://packagist.org/packages/anasa/response-strategy)[ RSS](/packages/anasa-response-strategy/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (6)Used By (0)

anasa-response-strategy
=======================

[](#anasa-response-strategy)

Package to isolate the logic that determines the return type of the controller based on the source (API/Web).

This is an optional solution in Laravel to handle the type of output that will be implemented for a crud. Make sure to respect the naming standards or you will need to modify the AdditionalDataRequest inputs for (setMethod, setView, setRoute).

How it works:
-------------

[](#how-it-works)

1- From a middleware or similar logic set the Additional Data Request and identify the required Response Strategy

```
