2017 © Pedro Peláez
 

library adr

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

image

desmart/adr

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

  • Tuesday, April 18, 2017
  • by DeSmart
  • Repository
  • 5 Watchers
  • 0 Stars
  • 2,101 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 13 Versions
  • 0 % Grown

The README.md

Laravel ADR

ADR pattern implementation for Laravel. The package provides a set of tools making it easier to implement the Action-Domain-Responder pattern., (*1)


Installation

Install package using Composer:, (*2)

composer require desmart/adr

Register the package's service provider in config/app.php:, (*3)

'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., (*4)

The Responder can digest a single Entity or a Collection of Entities and transform them into a JSON API response., (*5)

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., (*6)

Each Model class that uses this trait will be granted the toEntity() method which converts the Model to an Entity., (*7)

The Versions

18/04 2017

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kamil Fojuth

18/04 2017

1.0.4

1.0.4.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kamil Fojuth

14/04 2017

1.0.3

1.0.3.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kamil Fojuth

13/04 2017

1.0.2

1.0.2.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kamil Fojuth

27/03 2017

1.0.1

1.0.1.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kamil Fojuth

21/02 2017

dev-laravel-53

dev-laravel-53

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kamil Fojuth

21/02 2017

0.1.4

0.1.4.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kamil Fojuth

21/02 2017

dev-develop

dev-develop

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kamil Fojuth

14/02 2017

1.0.0

1.0.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kamil Fojuth

09/01 2017

0.1.3

0.1.3.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kamil Fojuth

04/01 2017

0.1.2

0.1.2.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kamil Fojuth

10/11 2016

0.1.1

0.1.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kamil Fojuth

05/11 2016

0.1.0

0.1.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kamil Fojuth