New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

desmart/adr

ADR pattern implementation for Laravel. Designed for https://github.com/DeSmart/laravel-vanilla.
2,198

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 advised

Not 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
Maintainer: DeSmart

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

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

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