PHPackages                             teksite/module - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. teksite/module

ActiveLibrary[Framework](/categories/framework)

teksite/module
==============

a package to create modules for a laravel project

2.0.4(5mo ago)0291MITPHPPHP &gt;=8.2

Since Jan 29Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/teksite/module)[ Packagist](https://packagist.org/packages/teksite/module)[ RSS](/packages/teksite-module/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (6)Versions (12)Used By (1)

Modular Laravel Package
=======================

[](#modular-laravel-package)

A robust Laravel package designed to enable modularity, allowing you to organize your application into reusable, self-contained modules with commands similar to Laravel's native artisan commands.

Table of Contents
-----------------

[](#table-of-contents)

- [About](#about)
- [Author](#author)
- [Contact](#contact)
- [Installation](#installation)
- [Usage](#usage)
    - [Creating a Module](#creating-a-module)
    - [Module Commands](#module-commands)
    - [Changing Module Priority](#changing-module-priority)
    - [Integration with Lareon](#integration-with-lareon)
- [Credits](#credits)
- [License](#license)
- [Support](#support)

About
-----

[](#about)

The **Modular Laravel Package** (teksite/module) brings modularity to Laravel applications, enabling developers to create self-contained modules with their own controllers, models, views, and more. It mirrors Laravel's native artisan commands but prepends `module:` to distinguish module-specific commands. Modules are stored in the `Lareon/Modules` directory, which replicates a miniature Laravel structure for each module.

### Example

[](#example)

To create a controller in a specific module:

```
php artisan module:make-controller ExampleController ExampleModule --resource
```

Author
------

[](#author)

Developed by **Sina Zangiband**.

Contact
-------

[](#contact)

- Website: [teksite.net](https://teksite.net)
- Email:

Installation
------------

[](#installation)

### Compatibility

[](#compatibility)

**Laravel****Package**11.x^1.012.x^2.0### Step 1: Install via Composer

[](#step-1-install-via-composer)

Run the following command in your terminal:

```
composer require teksite/module
```

#### Note on wikimedia/composer-merge-plugin

[](#note-on-wikimediacomposer-merge-plugin)

If prompted with:

```
Do you trust "wikimedia/composer-merge-plugin" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?]

```

Press `y` and Enter. This plugin is required to merge `composer.json` files from modules.

### Step 2: Register the Service Provider

[](#step-2-register-the-service-provider)

> **Note**: Laravel 5.5 and above supports auto-discovery, so this step is optional for newer versions.

#### For Laravel 10 and 11

[](#for-laravel-10-and-11)

Add the service provider to `bootstrap/providers.php`:

```
