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

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

vestd/feature-flags
===================

Feature flags

1.0.0(10y ago)04.2kMITPHPPHP &gt;=5.4.0

Since Feb 1Pushed 10y ago4 watchersCompare

[ Source](https://github.com/vestd/FeatureFlags)[ Packagist](https://packagist.org/packages/vestd/feature-flags)[ RSS](/packages/vestd-feature-flags/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

Feature flags
=============

[](#feature-flags)

This is a basic Laravel 5 package for implementing feature flags.

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

[](#installation)

First, pull in the package through Composer.

```
composer require vestd/feature-flags
```

And then, if using Laravel 5, include the service provider within `app/config/app.php`.

```
'providers' => [
    Vestd\FeatureFlags\FeatureFlagServiceProvider::class
];
```

And finally publish the config file, this will be where you put the feature flag configuration

```
php artisan vendor:publish --provider="Vestd\FeatureFlags\FeatureFlagServiceProvider"
```

Usage in Laravel
----------------

[](#usage-in-laravel)

Within your codebase use Laravel's dependency injection to load in the FeatureFlags container. You can then call the get method to retrieve a previously configured feature flag. If the flag doesn't exist an exception will be thrown.

```
public function index(FeatureCollection $featureCollection)
{
    $feature = $featureCollection->get('new_home_page');

    if ($feature->isEnabled()) {
        view('new_homepage');
    } else {
        view('homepage');
    }
}
```

Configuration
-------------

[](#configuration)

In its simplest form the configuration file will allow to to specify a key and a true or false flag

```
  'feature_a' => true,
  'feature_b' => false,
```

The alternative method is an associative array for the keys, using this method you can specify which users or groups would have access to the feature

```
  'feature_c' => [
    'users'  => [123, 456],
    'groups' => ['admin', 'beta'],
  ]
```

If you use the more complex features you can check the state by using the following isEnabled checks

```
public function index(FeatureFlags $featureFlags)
{
    $feature = $featureFlags->get('new_home_page');

    if ($feature->isEnabledForUser(456) || $feature->isEnabledForGroup('admin')) {
        view('new_homepage');
    } else {
        view('homepage');
    }
}
```

Coming soon
-----------

[](#coming-soon)

The ability to configure the flags through a method other than a fixed config file, i.e. a database

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

[](#contributing)

Contributions are accepted but this package is being developed primarily for use within the Vestd app so if your use case differs too much from what we need it may not be accepted.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 87.5% 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 ~0 days

Total

3

Last Release

3755d ago

Major Versions

0.9.1 → 1.0.02016-02-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/03137fa9599372e5cb2e39286b1e720acb03a627ed0ff49d19fdb068f8b54e1d?d=identicon)[ArthurGuy](/maintainers/ArthurGuy)

---

Top Contributors

[![ArthurGuy](https://avatars.githubusercontent.com/u/92837?v=4)](https://github.com/ArthurGuy "ArthurGuy (7 commits)")[![MauMaGau](https://avatars.githubusercontent.com/u/896962?v=4)](https://github.com/MauMaGau "MauMaGau (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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