desmart/adr
Larablocks Analysis
desmart/adr works with Laravel 5 (latest release 1.0.4, Apr 18, 2017), which reached end of life: no more fixes, even for security.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 5, past end of life
- No release in the last 12 months (last: Apr 18, 2017)
- 0 downloads a month (needs 10,000)
- 0 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Apr 18, 2017.
- No releases in the last 12 months.
- First released: Nov 5, 2016.
- 1 open issue on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 3, 2026.
| Install | |
|---|---|
composer require desmart/adr |
|
| Latest Version: | 1.0.4 |
| PHP: | >=7.0.0 |
| Laravel: | 5 |
| License: | MIT |
| Last Updated: | Apr 18, 2017 |
| Links: | GitHub · Packagist |
Laravel ADR
ADR pattern implementation for Laravel. The package provides a set of tools making it easier to implement the Action-Domain-Responder pattern.
Installation
Install package using Composer:
composer require desmart/adr
Register the package's service provider in config/app.php:
'providers' => [
(...)
DeSmart\ADR\ServiceProvider::class,
],
Usage
The main goal of this package is to make it easier to implement the ADR pattern. This means that you should be able to
create Actions (Controllers with a single callable method, e.g. execute()) that return a Responder.
The Responder can digest a single Entity or a Collection of Entities and transform them into a JSON API response.
Example
class ADRAction extends \DeSmart\ADR\Actions\BaseAction
{
public function execute()
{
$user = new User('John', 'john@desmart.com');
return $this->respondWith($user);
}
}
Model to Entity hydration
In order to hydrate an entity from a model (and vice versa) the package comes with a helper - HydratesEntityTrait.
Each Model class that uses this trait will be granted the toEntity() method which converts the Model to an Entity.
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 1.0.4 | >=7.0.0 | 5.4.* | MIT | |
| 1.0.3 | >=7.0.0 | 5.4.* | MIT | |
| 1.0.2 | >=7.0.0 | 5.4.* | MIT | |
| 1.0.1 | >=7.0.0 | 5.4.* | MIT | |
| 1.0.0 | >=7.0.0 | 5.4.* | MIT | |
| 0.1.4 | >=7.0.0 | 5.3.* | MIT | |
| 0.1.3 | >=7.0.0 | 5.3.* | MIT | |
| 0.1.2 | >=7.0.0 | 5.3.* | MIT | |
| 0.1.1 | >=7.0.0 | 5.3.* | MIT | |
| 0.1.0 | >=7.0.0 | 5.3.* | MIT |