octopy/l3d

Laravel Domain Design Pattern

dev-main 2025-05-19 18:05 UTC

This package is auto-updated.

Last update: 2025-05-19 18:06:14 UTC


README

Welcome to L3D – an elegant and modular solution for structuring your Laravel applications using Domain-Driven Design (DDD) principles. πŸš€

Why Choose L3D?

L3D helps you:

  • πŸ“‚ Organize your code in a modular, scalable way
  • 🎯 Separate business logic into well-defined domains
  • ⚑ Enhance application maintainability and scalability
  • πŸ” Make code easier to navigate and understand
  • πŸ› οΈ Embrace clean architecture principles with ease

Automated Magic! πŸŽ‰ With L3D, you don’t need to manually:

  • βœ… Register service providers
  • βœ… Configure migration paths
  • βœ… Set up domain-specific routes
  • βœ… Define factory locations

and more...

All of this is automatically handled behind the scenes. πŸͺ„

Compatibility

  • PHP 8.4+
  • Laravel 12.0+

Installation

1. Install via Composer:

composer require octopy/l3d

2. Register domain paths manually (Optional)

By default, L3D will automatically discover domains inside the default directory. If you prefer to store your domains elsewhere, you can configure the location like this:

public function register()
{
    l3d()->register([
        'App\\Domain\\' => app_path('Domain')
    ]);
}

Production Optimization

For maximum performance in production, enable domain caching:

php artisan l3d:cache

Need to clear the cache? Use:

php artisan l3d:clear

Contributing

We greatly appreciate contributions from the community! Feel free to submit pull requests or report issues if you find bugs or have suggestions for improvements.

Security

If you discover any security related issues, please email bug@octopy.dev instead of using the issue tracker.

Credits

License

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