Download the PHP package hatchyu/laravel-modular-lite without Composer

On this page you can find all versions of the php package hatchyu/laravel-modular-lite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-modular-lite

Laravel Modular Lite

Latest Version on Packagist Total Downloads

A lightweight, zero-ceremony Modular Architecture package for Laravel applications. Designed for developers who want the organizational benefits of feature-based modules without the cognitive overhead of complex enterprise abstractions.

[!TIP] Building an Enterprise Application?
If you are building large-scale, complex enterprise platforms (ERP, CRM, Banking, Multi-domain systems) requiring strict Domain-Driven Design (DDD) 4-layer boundaries, CQRS (Actions/Queries/Data), and architectural testing, check out our flagship enterprise package:
πŸ‘‰ hatchyu/laravel-modular (composer require hatchyu/laravel-modular)


🎯 Design Philosophy: Stay Close to Laravel

If you are building an MVP, SaaS, eCommerce store, or internal tool, you don't always need 7 architectural layers (Domain Model, Contract, Repository, DTO, Action, Request, Resource, Controller) for a simple database record.

Laravel Modular Lite gives you:


πŸ“‚ Module Structure

When you create a module with php artisan module:make Shop, it generates a clean, conventional directory tree:


πŸ“¦ Installation

Install the package via Composer:

Add the modules PSR-4 namespace to your root composer.json:

Then regenerate Composer's autoloader:

(Optional) Publish the configuration file:


πŸ”Œ Module Lifecycle & Dependencies

Every module includes a lightweight module.json manifest located at modules/{ModuleName}/module.json (auto-generated by php artisan module:make):

Enabling & Disabling Modules

Easily disable modules during maintenance or feature rollout without altering codebase structure:

When disabled, all of the module's routes, providers, migrations, views, config, and commands are automatically excluded from the application lifecycle.

Topological Boot Ordering

When modules declare dependencies, Laravel Modular Lite automatically sorts them topologically using Kahn's algorithm so that prerequisite modules (e.g., Inventory) are registered and booted before dependent modules (e.g., Shop).

How Disabled or Missing Dependencies Are Handled

If a module depends on another module that is disabled or missing:

  1. At Application Boot Time: If Shop is active but depends on disabled Inventory, the system raises an explicit, actionable exception:

  2. At CLI Level (Dependency Protection):

    • Protection Against Breaking Dependents: You cannot disable a prerequisite module if active modules depend on it:

    • Validation on Enable: Enabling a module validates that all required dependencies are present and enabled:
  3. Health Diagnostics (php artisan module:doctor): Displays module status and flags disabled or missing dependencies directly in the health table.

πŸš€ Usage & Artisan Commands

1. Module Management

2. Instant CRUD Generation

Generate an entire vertical slice in one command:

This generates:

  1. Models/Product.php
  2. Database/Migrations/xxxx_create_products_table.php
  3. Database/Factories/ProductFactory.php
  4. Requests/StoreProductRequest.php & UpdateProductRequest.php
  5. Resources/ProductResource.php
  6. Controllers/Api/ProductController.php (pure Eloquent queries)
  7. Tests/Feature/ProductControllerTest.php
  8. Appends Route::apiResource('products', ProductController::class); to Routes/api.php

3. Granular Generators


⚑ Production Optimization

In production environments, avoid scanning the filesystem on every request by compiling a discovery manifest:

To clear the compiled cache:

(Integrated with native php artisan optimize and php artisan optimize:clear).


βš–οΈ When to Choose Lite vs Enterprise

Need laravel-modular-lite (This Package) laravel-modular (Enterprise)
Ideal For Startups, SaaS, eCommerce, CRUD apps ERP, CRM, Banking, Complex Domains
Layering Simple folders (Models, Controllers, Services) Strict 4-Layer DDD (Domain, Application, Interface, Infrastructure)
Data Flow Direct Eloquent queries in controllers/services CQRS (Actions, Queries, DTOs, Repository Interfaces)
Guardrails Conventional Laravel Architectural boundary enforcement via Pest Arch

πŸ§ͺ Testing

🎨 Code Style


πŸ“„ License

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


All versions of laravel-modular-lite with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3||^8.4||^8.5
illuminate/console Version ^11.0||^12.0||^13.0
illuminate/database Version ^11.0||^12.0||^13.0
illuminate/routing Version ^11.0||^12.0||^13.0
illuminate/support Version ^11.0||^12.0||^13.0
illuminate/view Version ^11.0||^12.0||^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hatchyu/laravel-modular-lite contains the following files

Loading the files please wait ...