kalel1500/laravel-hexagonal-and-ddd-architecture-utilities

This package is abandoned and no longer maintained. The author suggests using the kalel1500/kalion package instead.

Utilidades para desarrollar en arquitectura hexagonal y DDD en laravel


README

Laravel Hexagonal and DDD

Total Downloads Latest Stable Version License

✨ Features

  • Utilities for developing in hexagonal architecture and DDD in Laravel.

Quick start

composer require kalel1500/kalion:@beta

Publish files

To publish all the files in the package you can use the following command:

php artisan vendor:publish --provider="Thehouseofel\Kalion\Infrastructure\KalionServiceProvider"

Or else you have the following to publish the files independently

php artisan vendor:publish --tag="kalion-migrations"
php artisan vendor:publish --tag="kalion-views"
php artisan vendor:publish --tag="kalion-view-layout"
php artisan vendor:publish --tag="kalion-config"
php artisan vendor:publish --tag="kalion-config-user"
php artisan vendor:publish --tag="kalion-config-links"
php artisan vendor:publish --tag="kalion-lang"

Start command

After installing the package, to start a project you can run the following command.

php artisan kalion:start

This command will modify several project files to the recommended settings.

In addition, it will generate new files to add complete examples to the project with the following views:

  • Home
  • Posts
  • Tags

Package configuration

Redirect after login

You can configure where the application will redirect (as long as no previous route is found) in three ways:

  1. Overriding the kalion.auth.redirect_after_login configuration in config/kalion.php file:

    return [
        'auth' => [
            'redirect_after_login' => env('KALION_AUTH_REDIRECT_AFTER_LOGIN', 'home')
        ]
    ];
  2. Using the KALION_AUTH_REDIRECT_AFTER_LOGIN environment variable:

    KALION_AUTH_REDIRECT_AFTER_LOGIN=home
  3. Or using the redirectAfterLoginTo() method of the Kalion class in the register method of a ServiceProvider for a more complex configuration:

    public function register(): void
    {
        \Thehouseofel\Kalion\Infrastructure\Services\Kalion::redirectAfterLoginTo('home');
    }

    This method also accepts a callback.

Default path

You can configure where the application will redirect to by default in three ways:

  1. Overriding the kalion.default_path configuration

    return [
        'default_path' => env('KALION_DEFAULT_PATH', 'home')
    ];
  2. Using the KALION_DEFAULT_PATH environment variable:

    KALION_DEFAULT_PATH=home
  3. Or using the redirectAfterLoginTo() method of the Kalion class in the register method of a ServiceProvider for a more complex configuration:

    public function register(): void
    {
        \Thehouseofel\Kalion\Infrastructure\Services\Kalion::redirectDefaultPathTo('home');
    }

    This method also accepts a callback.

License

Kalion is open-sourced software licensed under the GNU General Public License v3.0.