PHPackages                             garmonic/laravel-features-arch - 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. garmonic/laravel-features-arch

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

garmonic/laravel-features-arch
==============================

This package helps you to divide you Laravel project code by features, encapsulated in separate folders. Each feature has its own container, configuration, routes, views and providers. You can enable and disable your features in general config file.

1.1(3y ago)29MITPHPPHP ^7.4|^8.0

Since Apr 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/garmonic/laravel-features-arch)[ Packagist](https://packagist.org/packages/garmonic/laravel-features-arch)[ RSS](/packages/garmonic-laravel-features-arch/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

Laravel Features Architecture
=============================

[](#laravel-features-architecture)

Description
-----------

[](#description)

This package helps you to divide your Laravel project code by features, encapsulated in separate folders. Each feature has its own container, configuration, routes, views and providers. You can enable and disable your features in general config file.

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

[](#installation)

1. Use following composer command in your terminal:

`composer require garmonic/laravel-features-arch`

If file `config/features.php` has not been created, run such command:

`php artisan vendor:publish --provider='Garmonic\FeaturesArch\Providers\FeatureServiceProvider'`

2. Add to `composer.json` file (section `"psr-4"` in `"autoload"`) following string:

`"Features\\": "features/",`

Usage
-----

[](#usage)

### Creating new feature

[](#creating-new-feature)

To create new feature, run console command:

`php artisan make:feature ` with name of your feature, for example:

`php artisan make:feature Warehouse`

If you wish to specify routes beginning for feature, use option `route` with its value, example for beginning `/wh/`:

`php artisan make:feature Warehouse --route=wh`

Route base should not start with slash, but can contain it inside. By default, route base will be made from feature name converted to lower case.All routes will be automatically prefixed by specified or generated beginning.

Finally, new folder `/features/{your-feature-name}` will appear in your project. It will be place of new feature.

### Enabling and disabling features

[](#enabling-and-disabling-features)

To **enable** feature, add its name and main class name (`Features\\{name}\\Feature::class`) to `config/features.php` (section `"list"`).

To **disable** it, comment its string in the same config file.

### Feature folder files structure

[](#feature-folder-files-structure)

- `config/main.php` — empty **config file** for feature.

You can read config from it using `Feature::config()`. In controller: `$this->feature->config('main.config_key', 'default');`

Also you can add your own config files to feature `config` folder and use them in the same way.

- `Core/Http/Controllers/MainController` — empty **controller** with one demo method.

You can create your own controllers for feature, each of them should extend `Garmonic\FeaturesArch\BaseController` and contain correct `featureName` property.

- `Core/Providers/MainServiceProvider.php` — empty **service provider**, you are welcome to add there some bindings (as you do in `AppServiceProvider`), that will be actual for this feature.

You can use global container (`App::singleton()` or `App::bind()`) or **feature container** (`$this->feature->singleton()` or `$this->feature->bind()`).

- `Core/Providers/RouteServiceProvider.php` — this service provider is responsible for loading feature routes. Be careful while changing its code.
- `resources/views/home.blade.php` — sample **view**.

You can add your own views and use them in controllers like this: `return $this->feature->view('view_name', ['data'=>'some_data'])`; Also, each view has `$feature` variable to have access to feature instance.

- `routes/api.php` — empty API routes file.
- `routes/web.php` — web **routes** file with demo route.

Links to feature routes can be generated using `Feature::route()` method.

In controller: `$this->feature->route('route_name', ['data'=>'some_data']);`

In view: `{{ $feature->route('route_name', ['data'=>'some_data']) }}`

About author
------------

[](#about-author)

Alexey Vasilyev,

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% 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 ~98 days

Total

3

Last Release

1342d ago

PHP version history (2 changes)1.0PHP ^7.4|8.0

1.0.1PHP ^7.4|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/89571200?v=4)[garmonic](/maintainers/garmonic)[@garmonic](https://github.com/garmonic)

---

Top Contributors

[![codewayblog](https://avatars.githubusercontent.com/u/102867385?v=4)](https://github.com/codewayblog "codewayblog (10 commits)")[![garmonic](https://avatars.githubusercontent.com/u/89571200?v=4)](https://github.com/garmonic "garmonic (1 commits)")

### Embed Badge

![Health badge](/badges/garmonic-laravel-features-arch/health.svg)

```
[![Health](https://phpackages.com/badges/garmonic-laravel-features-arch/health.svg)](https://phpackages.com/packages/garmonic-laravel-features-arch)
```

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k42](/packages/civicrm-civicrm-core)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k18](/packages/solspace-craft-freeform)[drupal-code-builder/drupal-code-builder

Code generator for Drupal

27253.3k1](/packages/drupal-code-builder-drupal-code-builder)

PHPackages © 2026

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