kalel1500/kalion

Utilidades para desarrollar en arquitectura hexagonal y DDD en laravel

Maintainers

Package info

github.com/kalel1500/kalion

pkg:composer/kalel1500/kalion

Transparency log

Statistics

Installs: 414

Dependents: 1

Suggesters: 0

Stars: 3

Open Issues: 0

v0.57.0-beta.0 2026-07-29 13:21 UTC

This package is auto-updated.

Last update: 2026-08-04 13:23:58 UTC


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\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

Redirections

You can configure where the application will redirect in two cases:

  • When searching for the default path
  • After login (if no previous route is found)

There are two configurations for this (in config/kalion.php):

  • kalion.auth.redirect_guests (KALION_AUTH_REDIRECT_GUESTS)
  • kalion.auth.redirect_users (KALION_AUTH_REDIRECT_USERS)

For more complex cases, you can use the configuration method:

use Illuminate\Http\Request;
use Thehouseofel\Kalion\Core\Infrastructure\Support\Facades\KalionConfig;

public function register(): void
{
     KalionConfig::redirectTo(
        guests: '/welcome',
        users: '/panel',
    );

     // Using a closure...
    KalionConfig::redirectTo(
        guests: fn(Request $request) => route('welcome'),
        users: fn(Request $request) => route('panel'),
    );
}

If both routes match, simply configure the default path.

License

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