Download the PHP package mehediishere/laravel-modular without Composer

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

mehediishere/laravel-modular

A native, zero-dependency modular architecture package for Laravel Modular systems.

No magic traits. No JSON state files. Just pure Laravel.


Features


Requirements

Dependency Version
PHP ^8.2
Laravel ^11.0 ^12.0 ^13.0

Installation

Laravel's package auto-discovery registers the service provider automatically.

Publish the config files:

This creates two files in your project:

Add the Modules namespace to your project's composer.json:

Then run composer dump-autoload.


Quick start

1. Scaffold a module

Each command creates a full module folder at Modules/{Name}/:

2. Enable the module

Open config/modules.php and add your module:

3. Autoload and migrate


Sidebar management

The group_id concept

The sidebar is built from each module's config/sidebar.php. The key field is group_id — a short snake_case string that identifies which dropdown group this module's items belong to.

Modules with the same group_id are merged into one dropdown.

This means you can have Account and Payroll as separate modules but group them both under a single "Finance" dropdown in the sidebar — neither module needs to know about the other.

Sidebar config schema

Standalone groups

If a module should appear as its own top-level dropdown with no sharing, just use its own unique group_id:

Using the sidebar in your admin layout

Or publish and use the bundled layout:

The built sidebar array structure

Flushing the sidebar cache

Disable caching during development:


Module service provider

The generated {Name}ServiceProvider extends BaseModuleServiceProvider:

BaseModuleServiceProvider automatically handles:

What From where
Migrations database/migrations/
Views resources/views/account::
Translations resources/lang/account::
Web routes routes/web.php
API routes routes/api.php
Module config config/config.phpaccount.*

Accessing module config


Inter-module communication

Modules should never import classes from each other directly. Use one of:

Events (zero coupling):

Contracts (return values needed):


Customising stubs

Publish the stubs to your project:

Stubs are written to stubs/modular/. The module:make command checks for your custom stubs first before falling back to package defaults.

Stub file Generates
service-provider.stub app/Providers/{Name}ServiceProvider.php
sidebar-config.stub config/sidebar.php
module-config.stub config/config.php
routes-web.stub routes/web.php
routes-api.stub routes/api.php
test-case.stub tests/TestCase.php

PHPUnit test suites

Add a testsuite entry per module in phpunit.xml:

Run a single module's tests:


Configuration reference

config/modules.php

config/modular.php


Changelog

v1.0.0


License

MIT — see LICENSE


Author

Mehedi Hassan@mehediishere


Full command reference (v1.1)

Utility

Generators

All generators follow the pattern: php artisan module:make-{type} {ClassName} {Module}

All generators accept --force to overwrite an existing file.

Translation


All versions of laravel-modular with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/console Version ^11.0|^12.0|^13.0
illuminate/filesystem Version ^11.0|^12.0|^13.0
illuminate/routing Version ^11.0|^12.0|^13.0
illuminate/cache 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 mehediishere/laravel-modular contains the following files

Loading the files please wait ...