PHPackages                             codegaudi/laravel-feature-flags - 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. codegaudi/laravel-feature-flags

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

codegaudi/laravel-feature-flags
===============================

laravel-feature-flags

2.1.0(3y ago)11.2kMITPHPPHP ^8.0 || ^8.1CI failing

Since Jan 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/codegaudi/laravel-feature-flags)[ Packagist](https://packagist.org/packages/codegaudi/laravel-feature-flags)[ Docs](https://github.com/codegaudi/laravel-feature-flags)[ GitHub Sponsors](https://github.com/sponsors/codegaudi)[ RSS](/packages/codegaudi-laravel-feature-flags/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (5)Dependencies (4)Versions (7)Used By (0)

Laravel-Feature-Flags
=====================

[](#laravel-feature-flags)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c0989c9e6b54bba3888f17e54cb3304c7b8d6cb88d8b9f6cf2f2856a9a81c202/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f646567617564692f6c61726176656c2d666561747572652d666c6167732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codegaudi/laravel-feature-flags)[![GitHub Tests Action Status](https://camo.githubusercontent.com/f6d2c2092267d16dd054ec294df726de6c2bb329c4b4b6757ea3c87c878eed15/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f636f646567617564692f6c61726176656c2d666561747572652d666c6167732f54657374732f6d61696e3f7374796c653d666c61742d737175617265)](https://github.com/codegaudi/laravel-feature-flags/actions?query=workflow%3ATests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/70f94c89a30384e4677e5aac4aa3617ac00e93e81a18630aab9a390eb766c564/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f646567617564692f6c61726176656c2d666561747572652d666c6167732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codegaudi/laravel-feature-flags)

Laravel-Feature-Flags is a package which aims to add simple and easy to use feature flagging functionality to Laravel.

What is feature flagging?
-------------------------

[](#what-is-feature-flagging)

Feature flagging is a way to enable and disable features in your application.

For example:

- Push your new feature to production but enable it at a moment in the future
- Enable new features for small set of users

This package allows you to define a feature and

- enable or disable it globally
- enable or disable it for any type of model in your application

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

[](#installation)

You can install the package via composer:

```
composer require codegaudi/laravel-feature-flags
```

You can publish and run the migrations with:

```
php artisan vendor:publish --provider="Codegaudi\LaravelFeatureFlags\LaravelFeatureFlagsServiceProvider" --tag="migrations"
php artisan migrate
```

Usage
-----

[](#usage)

First of all you have to define a new feature. This can be done using the `Feature` facade.

```
use Codegaudi\LaravelFeatureFlags\Facades;

Feature::add($name = 'my-feature', $isEnabled = true);
```

You can also get the underlying eloquent model.

```
use Codegaudi\LaravelFeatureFlags\Facades;

Feature::findByName('my-feature');
```

You can enable or disable them using the following methods.

```
use Codegaudi\LaravelFeatureFlags\Facades;

Feature::enable('my-feature');
Feature::disable('my-feature');
```

You can check if a feature is enabled using the `isEnabled` and `isDisabled` methods.

```
Feature::isEnabled('my-feature');
Feature::isDisabled('my-feature');
```

To remove the feature from your application, simpy call the `remove` method.

```
Feature::remove('my-feature');
```

Of course you can add features to a model. You need to add the `HasFeatures` trait to the class of your choice

```
use Codegaudi\LaravelFeatureFlags\Traits\HasFeatures;

class User extends Model
{
    use HasFeatures;
}
```

Next, enable the feature using the `enableFeature` method.

```
$user = User::first();
$user->enableFeature(Feature::findByName('my-feature'));
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Samuel Nitsche](https://github.com/samuelnitsche)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~189 days

Total

5

Last Release

1199d ago

Major Versions

0.0.1 → 1.0.02021-01-12

1.0.1 → 2.0.02022-02-12

PHP version history (3 changes)0.0.1PHP ^7.4|^8.0

2.0.0PHP ^8.0

2.1.0PHP ^8.0 || ^8.1

### Community

Maintainers

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

---

Top Contributors

[![SamuelNitsche](https://avatars.githubusercontent.com/u/24483576?v=4)](https://github.com/SamuelNitsche "SamuelNitsche (36 commits)")

---

Tags

laravel-feature-flagscodegaudi

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/codegaudi-laravel-feature-flags/health.svg)

```
[![Health](https://phpackages.com/badges/codegaudi-laravel-feature-flags/health.svg)](https://phpackages.com/packages/codegaudi-laravel-feature-flags)
```

###  Alternatives

[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[tonysm/rich-text-laravel

Integrates Trix content with Laravel

46577.8k1](/packages/tonysm-rich-text-laravel)[mauricius/laravel-htmx

Laravel helper library for Htmx

364101.1k1](/packages/mauricius-laravel-htmx)[illuminate/reflection

The Illuminate Reflection package.

361.6M3](/packages/illuminate-reflection)[codinglabsau/laravel-feature-flags

Dynamic feature flags for laravel.

3861.4k](/packages/codinglabsau-laravel-feature-flags)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)

PHPackages © 2026

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