Download the PHP package mehul/laravel-enterprise-structure without Composer
On this page you can find all versions of the php package mehul/laravel-enterprise-structure. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mehul/laravel-enterprise-structure
More information about mehul/laravel-enterprise-structure
Files in mehul/laravel-enterprise-structure
Package laravel-enterprise-structure
Short Description Opinionated, optional project structure for long-term Laravel applications
License MIT
Informations about the package laravel-enterprise-structure
Laravel Enterprise Structure
Opinionated but optional project structure for long-term Laravel applications.
This package provides generators and conventions that guide teams toward maintainable, scalable architecture without modifying Laravel core behavior.
Installation
Install via Composer:
Publish the configuration:
Install the directory structure:
This creates the recommended folder structure in your Laravel application.
Commands
Create a Domain
Generate a new domain with standard structure:
Creates the domain directory and associated files under app/Domains/User/.
Create an Action
Generate a reusable action for business logic:
Actions contain atomic, single-responsibility operations.
Create a Use Case
Generate a use case that orchestrates multiple actions:
Use cases bind together actions to achieve specific user workflows.
Project Structure
Philosophy
🎯 Laravel remains untouched — No core modifications, only additions
🏗️ Architecture is optional — Use what you need, ignore what you don't
🎭 Controllers stay thin — They route and respond, nothing more
🔒 Domain logic stays isolated — Business rules live in domains, not controllers
🧩 Actions are reusable — Share logic across controllers, commands, and jobs
When NOT to Use This
- Small prototypes — Overkill for proof-of-concepts
- Single-developer throwaway apps — Simple CRUD needs simpler structure
- Short-lived projects — Architecture pays off over years, not weeks
Configuration
Customize paths and namespaces in config/enterprise-structure.php:
Testing
Run tests with Pest:
Run specific test file:
Requirements
- PHP 8.1+
- Laravel 10.0+
License
MIT License. See LICENSE for details.
Contributing
Contributions are welcome! Please submit pull requests with clear descriptions of changes.
Changelog
See CHANGELOG.md for version history.