edalzell/laravel-features

This is my package laravel-features

Maintainers

Package info

github.com/edalzell/laravel-features

pkg:composer/edalzell/laravel-features

Statistics

Installs: 64

Dependents: 0

Suggesters: 0

Stars: 18

Open Issues: 1

v0.4.0 2026-05-17 01:34 UTC

This package is auto-updated.

Last update: 2026-05-18 13:19:31 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Add self-contained features to your Laravel app or package, including all resources/routes/etc.

.
└── app/
...
└── features/
  │   └── MyGreatFeature/
  │       ├── database/
  │       │   ├── factories
  │       │   ├── migrations
  │       │   └── seeders
  │       ├── resources
  │       ├── routes
  │       └── src/
  │           ├── Models
  │           ├── ...
  │           └── ServiceProvider.php

Installation

You can install the package via composer:

composer require edalzell/laravel-features

Usage

To add a feature to your app:

php artisan make:feature MyGreatFeature

To add a feature to your package:

php artisan make:feature MyGreatFeature the-dev/my-package

This will create an empty (but necessary) service provider that autoloads/registers migrations, routes, & views and properly namespaces your factories, seeders and code.

If you want to add a feature manually, or convert something you already have into a feature:

  • create an features/YourFeature folder
  • create a ServiceProvider that extends FeatureServiceProvider (or PackageServiceProvider for a package feature).
  • add a pre-autoload-dump script to your composer.json:
"pre-autoload-dump": [
    "Edalzell\\Features\\Composer\\FeatureNamespaces::add"
]

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.