omatech/hexagon

Hexagonal Architecture scaffold generator

dev-master 2020-06-08 14:57 UTC

This package is auto-updated.

Last update: 2024-11-09 00:12:50 UTC


README

Latest Version on Packagist Build Status Quality Score Total Downloads

File structure generator for hexagonal architecture adapted to Laravel

Installation

You can install the package via composer:

composer require omatech/hexagon

Configuration

php artisan vendor:publish --tag=hexagon-config

Setup

  • Create Application, Domain and Infrastructure folders into app folder
  • Move Http and Console folders into app\Infrastructure and modify Kernels namespace
  • Modify RouteServiceProvider $namespace attribute to 'App\Infrastructure' and concatenate 'Http\Controllers' to '$this->namespace' in mapWebRoutes, and 'Api\Controllers' in mapApiRoutes
  • Modify bootstrap/app.php: Adjust Http and Console Kernels namespaces
  • Move Exception folder into app\Domain and modify Handler namespace
  • Modify bootstrap/app.php: Adjust Handler namespaces
  • Move app/User.php Model to app\Infrastructure\User folder and modify namespace
  • Modify config/auth.php adapting User class to the new namespace
  • Create RepositoryServiceProvider.php into app/Providers

Customizing Templates

php artisan vendor:publish --tag=hexagon-templates

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email epuig@omatech.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.