PHPackages                             jobmetric/laravel-extension - 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. jobmetric/laravel-extension

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

jobmetric/laravel-extension
===========================

This is a extension management package for Laravel that you can use in your projects.

2.1.0(3mo ago)6522MITPHPPHP &gt;=8.0.1CI passing

Since Jun 28Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/jobmetric/laravel-extension)[ Packagist](https://packagist.org/packages/jobmetric/laravel-extension)[ Docs](https://jobmetric.github.io/packages/laravel-extension)[ RSS](/packages/jobmetric-laravel-extension/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (5)Versions (12)Used By (2)

[![Contributors](https://camo.githubusercontent.com/b79681152f4adde2f978511eb1a89e44bd8c9ae4282b685f51f0b1ad478ab649/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f6a6f626d65747269632f6c61726176656c2d657874656e73696f6e2e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/jobmetric/laravel-extension/graphs/contributors)[![Forks](https://camo.githubusercontent.com/f2d3beaf128d143d35bd3843c7286e93efd6884ad32361f413b867c16c67b987/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6a6f626d65747269632f6c61726176656c2d657874656e73696f6e2e7376673f7374796c653d666f722d7468652d6261646765266c6162656c3d466f726b)](https://github.com/jobmetric/laravel-extension/network/members)[![Stargazers](https://camo.githubusercontent.com/feaa21dbefa373dc2fce186687ded452a6a4c34bc79a2e9f9c90e37f013f9aa9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6a6f626d65747269632f6c61726176656c2d657874656e73696f6e2e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/jobmetric/laravel-extension/stargazers)[![MIT License](https://camo.githubusercontent.com/631c8e2a2443c599a11788b7b4e382ace88caccf4580293f91812f9454767173/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a6f626d65747269632f6c61726176656c2d657874656e73696f6e2e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/jobmetric/laravel-extension/blob/master/LICENCE.md)[![LinkedIn](https://camo.githubusercontent.com/eb590f47a3fca74584d18db8dd3e985ae3d786f50cd41b7530c3af3885da233c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d4c696e6b6564496e2d626c75652e7376673f7374796c653d666f722d7468652d6261646765266c6f676f3d6c696e6b6564696e26636f6c6f72423d353535)](https://linkedin.com/in/majidmohammadian)

Laravel Extension
=================

[](#laravel-extension)

**Build Extensions and Plugins. Scale Your App.**

Laravel Extension simplifies the management of extensions and plugins within Laravel applications. Stop wiring every feature by hand and start building installable, type-based extensions (e.g. Module, PaymentMethod) with their own migrations, config, routes, and plugins. It offers discovery from registered namespaces, install/uninstall lifecycle with migrations, plugin CRUD with form definitions from each extension, and a kernel that registers and boots only installed extensions. This is where powerful extension management meets developer-friendly simplicity—giving you complete control over extensions and plugins without the complexity.

Why Laravel Extension?
----------------------

[](#why-laravel-extension)

### Type-Based Extensions

[](#type-based-extensions)

Create extensions by type (e.g. Module, ShippingMethod). Each type is registered in ExtensionTypeRegistry (via config or at runtime). Extensions live under a namespace registered in ExtensionNamespaceRegistry (e.g. `App\Extensions`). The kernel discovers extension classes from those namespaces and registers them by type. You get a clear structure: one extension class per type+name, with `extension.json`, migrations, and optional views/translations.

### Install and Uninstall Lifecycle

[](#install-and-uninstall-lifecycle)

Install an extension by namespace: the package runs its migrations, stores the extension record, and when the extension is not "multiple", creates a default plugin. Uninstall rolls back migrations, deletes plugins, and removes the extension record. InstalledExtensionsFile keeps a JSON cache of installed namespaces so the kernel can load only installed extensions. Upgrade runs new migrations when the extension version increases; you can also delete extension files from disk after uninstall when they live under `App\Extensions`.

### Plugins with Form-Driven Data

[](#plugins-with-form-driven-data)

Each extension extends AbstractExtension and defines `form()` (FormBuilder) and `handle(array $options)`. Plugins belong to an extension and store name, fields (form output), and status. The Plugin service uses StorePluginRequest/UpdatePluginRequest and the extension’s form to validate and normalize plugin data. You can list plugins, add or edit them per extension, and run extension logic via `handle()` with the plugin’s stored options.

### Kernel: Discover, Register, Boot

[](#kernel-discover-register-boot)

ExtensionKernel discovers extension classes from ExtensionNamespaceRegistry, registers them in ExtensionRegistry (type =&gt; namespaces). It loads only installed extensions from the database, then runs register (configuration, bindings) and boot (migrations, routes, views, translations) per extension in priority order. Route model bindings for `jm_extension` and `jm_plugin` are registered; upgrade and boot run after the app is booted. Optional discover cache (config) avoids filesystem scans on every request.

What is Extension Management?
-----------------------------

[](#what-is-extension-management)

Extension management is the process of defining, discovering, installing, and running extensions and their plugins. In a traditional Laravel application, you might add features by hand in the same codebase with no install/uninstall story. Laravel Extension takes a different approach:

- **Discovery**: ExtensionNamespaceRegistry holds namespaces (e.g. `App\Extensions`); ExtensionKernel scans them and registers each extension class in ExtensionRegistry by type (from extension.json or class).
- **Types**: ExtensionTypeRegistry holds extension types (e.g. Module) with optional label/description; config `extension.types` seeds it; you can register more at runtime.
- **Install/Uninstall**: Extension service installs by FQCN (runs migrations, stores record, optional default plugin), uninstalls (rollback, delete plugins, destroy record), and can delete extension files from disk when uninstalled and under App\\Extensions.
- **Plugins**: Each extension can have one or many plugins (when `multiple` in extension.json); Plugin service provides store/update/destroy and storeForExtension/updateForExtension; form and options come from AbstractExtension::form() and handle().

Consider a "Banner" module: you create the extension class under `App\Extensions\Module\Banner`, add `extension.json` (extension, name, version, title, multiple, etc.), add a `migrations` folder with versioned migration files, implement `configuration(ExtensionCore)`, `form()`, and `handle(options)`. After running `php artisan migrate`, you install it via Extension::install(namespace); the kernel then registers and boots it. You add plugins via Plugin::store(extensionId, data); each plugin’s fields are validated by the extension’s form. The power of extension management lies in having a single lifecycle: discover types and classes, install only what you need, and run each extension’s logic through plugins with structured data.

What Awaits You?
----------------

[](#what-awaits-you)

By adopting Laravel Extension, you will:

- **Structure extensions by type** - Module, PaymentMethod, or custom types; each extension has one class, extension.json, and optional migrations and assets
- **Install and uninstall cleanly** - Migrations run on install and roll back on uninstall; optional default plugin; delete files when under App\\Extensions
- **Manage plugins per extension** - Store and update plugins with form-based validation; run extension logic via handle(options)
- **Control discovery and boot** - Registries for namespaces and types; kernel discovers, loads installed only, then registers and boots in priority order
- **Use Artisan commands** - extension:make, extension:make-tools, extension:install, extension:uninstall to generate and manage extensions
- **Integrate with the rest of the stack** - Laravel Layout can position plugins; events cover install, uninstall, delete, and plugin CRUD; facades and helpers (extension\_install, extension\_uninstall) for easy access

Quick Start
-----------

[](#quick-start)

Install Laravel Extension via Composer:

```
composer require jobmetric/laravel-extension
```

Documentation
-------------

[](#documentation)

Ready to transform your Laravel applications? Our comprehensive documentation is your gateway to mastering Laravel Extension:

**[📚 Read Full Documentation →](https://jobmetric.github.io/packages/laravel-extension/)**

The documentation includes:

- **Getting Started** - Quick introduction, installation, and migrate after install
- **Extension Service** - install, uninstall, delete (files), list by type (installed/needs\_update), getInfo, upgrade, isUpdated, namespaceFor
- **Plugin Service** - store, update, destroy, storeForExtension, updateForExtension; form validation via AbstractExtension::form()
- **AbstractExtension** - configuration(ExtensionCore), form(), handle(options); extension.json (extension, name, version, title, multiple, priority, depends); install/uninstall migrations
- **ExtensionKernel** - discover, loadInstalledExtensions, registerExtensions, bootExtensions, upgradeExtensions
- **Registries** - ExtensionNamespaceRegistry, ExtensionTypeRegistry, ExtensionRegistry; InstalledExtensionsFile
- **Commands** - extension:make, extension:make-tools, extension:install, extension:uninstall
- **Models &amp; Resources** - Extension, Plugin, ExtensionMigration; ExtensionResource, PluginResource
- **Requests** - StorePluginRequest, UpdatePluginRequest (form-based)
- **Events** - Extension install/uninstall/delete; Plugin store/update/delete; kernel discovering/registered/booted
- **Helpers** - extension\_install(type, name), extension\_uninstall(type, name, force\_delete\_plugin)
- **Real-World Examples** - See how it works in practice

Contributing
------------

[](#contributing)

Thank you for participating in `laravel-extension`. A contribution guide can be found [here](CONTRIBUTING.md).

License
-------

[](#license)

The `laravel-extension` is open-sourced software licensed under the MIT license. See [License File](LICENCE.md) for more information.

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance80

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.6% 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 ~62 days

Recently: every ~97 days

Total

11

Last Release

104d ago

Major Versions

1.7.0 → 2.0.02026-03-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/b00d08bd4b0b765ee2d33719a535e6cb49c04fb945078a0809d5c05e6f16ee96?d=identicon)[majidmohammadian](/maintainers/majidmohammadian)

---

Top Contributors

[![MajidMohammadian](https://avatars.githubusercontent.com/u/2099965?v=4)](https://github.com/MajidMohammadian "MajidMohammadian (215 commits)")[![Bagheri-Matin](https://avatars.githubusercontent.com/u/239607447?v=4)](https://github.com/Bagheri-Matin "Bagheri-Matin (2 commits)")[![hassan7303](https://avatars.githubusercontent.com/u/128932029?v=4)](https://github.com/hassan7303 "hassan7303 (1 commits)")

---

Tags

pluginlaravelpackageextensioncomponentmanagementjobmetric

### Embed Badge

![Health badge](/badges/jobmetric-laravel-extension/health.svg)

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

###  Alternatives

[typicms/base

A modular multilingual CMS built with Laravel, enabling developers to manage structured content like pages, news, events, and more.

1.6k20.4k](/packages/typicms-base)[creasi/laravel-nusa

A Laravel package that aim to provide Indonesia' Administrative Data

997.7k2](/packages/creasi-laravel-nusa)

PHPackages © 2026

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