PHPackages                             packagit/packagit - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. packagit/packagit

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

packagit/packagit
=================

amazing laravel module management with hacking tricks

v1.0.14(1y ago)2429115Apache-2.0PHP

Since Jun 3Pushed 1y ago3 watchersCompare

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

READMEChangelog (10)DependenciesVersions (12)Used By (0)

Packagit
========

[](#packagit)

Packagit is amazing laravel modules management, you could manage huge project with many separate laravel modules.

You could run `packagit` or a short name `p`, such as `p new Auth`, a module named Auth would be created.

You can make artisan command running anywhere, All the packagit commands are same with artisan like following table.

artisanpackagitphp artisan tinkerp tinkerphp artisan make:controllerp make:controllerphp artisan make:migrationp make:migrationphp artisan make:jobp make:jobphp artisan testp testphp artisan ...p ...for example, you have a project named `starter`, directories layout:

```
starter
    └── modules
        ├── Auth
        ├── Components
        └── Wechat

```

change path to `starter/modules/Auth`, and run `p make:controller`:

```
cd starter/modules/Auth
p make:controller DemoController

```

DemoController.php would be created for Auth module.

```
modules/Auth/src/Http/
└── Controllers
   └── DemoController.php

```

change path to `starter/app/Http/Controllers`, and `p make:controller`:

```
cd starter/app/Http/Controllers
p make:controller DemoController

```

DemoController.php would be created for starter, because of current path doesn't include any module.

So when you run `p make:xxx` laravel command, packagit would scan the path, if current is in a module path, it will create for the module, otherwise for the project.

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

[](#installation)

`composer global require packagit/packagit`

You MUST install `packagit` with `global`, and add composer bin to the $PATH environment.

Following command would help you find the global bin path:

```
composer global config bin-dir --absolute --global

# such as $HOME/.composer/vendor/bin, add to $PATH
# save to ~/.zshrc or ~/.bashrc
export PATH=$HOME/.composer/vendor/bin:$PATH

```

Usage
-----

[](#usage)

**1. Custom package namespace (Optional)**

run `p custom`

`config/packagit.php` file would be created, you could customize namespace by edit this file, skip here if you don't need custom.

**2. Create a new module**

run `packagit new ModuleName`

you also could group many modules as `Components` or others you want.

```
packagit new Components/NetUtil
packagit new Components/Updater
packagit new Components/Downloader

```

### A Module Structure:

[](#a-module-structure)

```
├── README.md
├── composer.json
├── config
│   └── config.php
├── database
│   ├── factories
│   ├── migrations
│   └── seeders
│       └── DatabaseSeeder.php
├── package.json
├── resources
├── routes
│   ├── api.php
│   └── web.php
├── src
│   ├── Models
│   └── Providers
│       ├── CommandServiceProvider.php
│       ├── RouteServiceProvider.php
│       └── ServiceProvider.php
├── tests
│   ├── Feature
│   └── Unit
└── webpack.mix.js

```

### Load modules in project

[](#load-modules-in-project)

1、composer require `wikimedia/composer-merge-plugin`

edit project/composer.json =&gt; extra =&gt; merge-plugins:

```
    "extra": {
        "merge-plugin": {
            "include": [
                "modules/*/composer.json",
                "modules/Components/*/composer.json"
            ],
            "recurse": false,
            "replace": true,
            "ignore-duplicates": false,
            "merge-dev": true,
            "merge-extra": true,
            "merge-extra-deep": true
        },
        "laravel": {
            "dont-discover": []
        }
    },

```

2、composer dump-autoload

3、edit project/config/app.php

```
    'providers' => [
        \Packagit\[MoudleName]\Providers\ServiceProvider::class,
    ],

```

All done, modules should work well.

License
-------

[](#license)

The Apache License 2. Please see [License File](LICENSE.md) for more information.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~91 days

Recently: every ~166 days

Total

11

Last Release

529d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5e2e4c13033d08787ed1d14726e5fb74f15fdd7836e655cb558b2a34eb689a9e?d=identicon)[zencodex](/maintainers/zencodex)

---

Top Contributors

[![zencodex](https://avatars.githubusercontent.com/u/295317?v=4)](https://github.com/zencodex "zencodex (17 commits)")[![mouyong](https://avatars.githubusercontent.com/u/10336437?v=4)](https://github.com/mouyong "mouyong (1 commits)")[![myxiaoao](https://avatars.githubusercontent.com/u/1223134?v=4)](https://github.com/myxiaoao "myxiaoao (1 commits)")[![Yinyao-Tech](https://avatars.githubusercontent.com/u/123739282?v=4)](https://github.com/Yinyao-Tech "Yinyao-Tech (1 commits)")

---

Tags

laravellaravel-moduleslaravel-packageartisanlaravel-modulespackagit

### Embed Badge

![Health badge](/badges/packagit-packagit/health.svg)

```
[![Health](https://phpackages.com/badges/packagit-packagit/health.svg)](https://phpackages.com/packages/packagit-packagit)
```

###  Alternatives

[stechstudio/laravel-php-cs-fixer

Easily format your Laravel Code with this Configuration file and accompanying artisan command.

146718.6k2](/packages/stechstudio-laravel-php-cs-fixer)[imliam/laravel-env-set-command

Set a .env file variable from the command line

118352.4k10](/packages/imliam-laravel-env-set-command)[christophrumpel/artisan-benchmark

Benchmark Artisan Commands

17966.6k](/packages/christophrumpel-artisan-benchmark)[msztorc/laravel-env

Laravel env helper commands

7855.4k](/packages/msztorc-laravel-env)[dollar/generators

Laravel 4 Generators w/ Bootstrap 3

7723.2k](/packages/dollar-generators)[dcblogdev/laravel-module-generator

Generate Laravel Modules from a template.

7710.1k1](/packages/dcblogdev-laravel-module-generator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
