Download the PHP package laraneat/modules without Composer

On this page you can find all versions of the php package laraneat/modules. 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 modules

Laraneat Modules

A Laravel package that provides a powerful modular architecture system for organizing large-scale applications into self-contained, reusable modules.

Table of Contents

Overview

Laraneat Modules helps you build maintainable, scalable Laravel applications. Inspired by the Porto SAP (Software Architectural Pattern), it encourages organizing code by business domains (modules) instead of technical layers.

Why Modular Architecture?

Traditional Laravel Modular Approach
All controllers in app/Http/Controllers Each module has its own controllers
All models in app/Models Each module has its own models
Coupled, hard to maintain Decoupled, easy to maintain
Difficult to reuse Easy to extract and reuse
Complex routing Module-scoped routing

Performance Comparison with nWidart/laravel-modules

This package is designed with performance in mind. With caching enabled, it adds virtually zero overhead — the cached manifest is a simple PHP array that loads in microseconds, and all core services use lazy loading.

Here's how it compares to the popular nWidart/laravel-modules:

Key Differences

Feature Laraneat Modules nWidart/laravel-modules
Module manifest composer.json only module.json + composer.json
Cache type Persistent file cache In-memory only (per request)
Service providers DeferrableProvider (lazy) Eager loading
Enable/disable modules Not supported Supported via JSON file
Architecture pattern Domain-driven (Porto-inspired) Flexible structure

Performance Impact

Production (with cache enabled)

Metric Laraneat nWidart
File operations (first request) 1 (cached manifest) N (module.json × modules)
File operations (subsequent) 1 N
Providers loaded On-demand All modules

Development (without cache)

Both packages scan the filesystem on each request. However, Laraneat uses DeferrableProvider, so the ModulesRepository is only instantiated when actually needed.

Why Laraneat is Faster

  1. Persistent manifest cache — Module metadata is cached to bootstrap/cache/laraneat-modules.php, eliminating filesystem scans in production.

  2. DeferrableProvider — Core services (ModulesRepository, Composer, console commands) implement Laravel's DeferrableProvider interface, loading only when requested.

  3. Single manifest file — Uses existing composer.json instead of requiring an additional module.json per module.

  4. No status file I/O — No modules_statuses.json reads on every request (unlike nWidart's enabled/disabled feature).

Recommendations

After deployment:

For development with many modules, consider enabling cache manually to avoid repeated filesystem scans.

Architecture Diagram

Module Internal Architecture

Request Flow Through Module

Actions serve as controllers using the lorisleiva/laravel-actions package. Each Action has two entry points:

Example Action:

Installation

Publish the configuration file:

Quick Start

1. Create Your First Module

This creates a new module at modules/blog/ with basic structure.

2. Create Module with Full API

This creates a complete REST API module with:

3. Generate Components

4. Run Module Migrations

Module Structure

A complete module follows this structure:

Core Concepts

Module

A Module represents a self-contained business domain. It's identified by its Composer package name (e.g., app/blog).

ModulesRepository

The ModulesRepository discovers and manages all modules in your application.

Actions

Actions are the core of the architecture. Using lorisleiva/laravel-actions, they serve dual purposes:

Routes point directly to Actions:

DTOs (Data Transfer Objects)

DTOs are simple objects that carry data between layers.

Module Service Provider

Each module has a service provider that extends ModuleServiceProvider:

Configuration

After publishing, edit config/modules.php:

Artisan Commands

Module Management

Command Description
module:list Display all registered modules
module:sync Refresh manifest and sync with Composer
module:delete {package} Delete a module completely
module:cache Build module manifest cache
module:cache:clear Clear module manifest cache

Module Creation

Component Generators

Command Description
module:make:action Create an Action class
module:make:controller Create a Controller (--ui=api|web)
module:make:model Create an Eloquent Model
module:make:migration Create a database migration
module:make:request Create a Form Request
module:make:resource Create an API Resource
module:make:dto Create a DTO class
module:make:event Create an Event class
module:make:listener Create an Event Listener
module:make:job Create a Job class
module:make:policy Create a Policy class
module:make:provider Create a Service Provider
module:make:middleware Create Middleware
module:make:command Create a Console Command
module:make:factory Create a Model Factory
module:make:seeder Create a Database Seeder
module:make:test Create a Test class
module:make:observer Create a Model Observer
module:make:notification Create a Notification
module:make:mail Create a Mailable
module:make:rule Create a Validation Rule
module:make:query-wizard Create a QueryWizard
module:make:route Create a Route file
module:make:exception Create an Exception class

Migration Commands

Command Description
module:migrate Run module migrations
module:migrate:rollback Rollback module migrations
module:migrate:reset Reset all module migrations
module:migrate:refresh Refresh module migrations
module:migrate:status Show migration status

Component Types

The package supports 30+ component types organized by architectural layers:

UI Layer

API Components:

WEB Components:

CLI Components:

Domain Layer

Infrastructure Layer

Database Layer

Module Presets

Plain Preset (Default)

Basic module with minimal structure:

Base Preset

Includes database layer components:

API Preset

Complete REST API module:

Best Practices

1. Keep Modules Independent

Modules should be loosely coupled. If module A depends on module B, consider:

2. Separate HTTP Logic from Business Logic

Keep asController() thin - it should only handle HTTP concerns. Put business logic in handle():

3. Reuse Actions Across Contexts

Actions can be called from multiple places:

4. Use DTOs for Data Transfer

DTOs provide type safety and clear contracts:

5. Organize Routes by Version

For APIs, version your routes:

6. Write Tests

Each module should have comprehensive tests:

7. Use Caching in Production

Enable manifest caching for better performance:

Run after deployment:

License

MIT License. See LICENSE for details.


All versions of modules with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-json Version *
composer/composer Version ^2.1
laravel/framework Version ^10.0 || ^11.0 || ^12.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 laraneat/modules contains the following files

Loading the files please wait ...