PHPackages                             mikefrancis/laravel-unleash - 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. mikefrancis/laravel-unleash

Abandoned → [mikefrancis/laravel-unleash](/?search=mikefrancis%2Flaravel-unleash)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

mikefrancis/laravel-unleash
===========================

An Unleash client for Laravel

v0.10(2y ago)62147.0k↓41.2%27[2 issues](https://github.com/laravel-unleash/laravel-unleash/issues)[4 PRs](https://github.com/laravel-unleash/laravel-unleash/pulls)1MITPHPCI failing

Since Oct 25Pushed 1y ago3 watchersCompare

[ Source](https://github.com/laravel-unleash/laravel-unleash)[ Packagist](https://packagist.org/packages/mikefrancis/laravel-unleash)[ GitHub Sponsors](https://github.com/mikefrancis)[ RSS](/packages/mikefrancis-laravel-unleash/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (17)Used By (1)

Laravel Unleash
===============

[](#laravel-unleash)

[![Codacy Badge](https://camo.githubusercontent.com/76432c960e89a7fe73b3eb565a90e1c84aba3fd9f17c56eaac7c81da1281bbcf/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3536623063363430326563613439313639636265623366343034633262666639)](https://app.codacy.com/manual/mikefrancis/laravel-unleash?utm_source=github.com&utm_medium=referral&utm_content=mikefrancis/laravel-unleash&utm_campaign=Badge_Grade_Dashboard)[![Packagist](https://camo.githubusercontent.com/0407daa8a3328371777e68bba6e44e95f1c56ee0aa91de063edba6920141bdbc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d696b656672616e6369732f6c61726176656c2d756e6c65617368)](https://packagist.org/packages/mikefrancis/laravel-unleash) [![Build Status](https://github.com/mikefrancis/laravel-unleash/workflows/CI/badge.svg)](https://github.com/mikefrancis/laravel-unleash/actions?query=workflow%3ACI) [![codecov](https://camo.githubusercontent.com/9efacf7ecf840c8fd9084040ca63226dcf85b4c20486ee1621f2cfdd541057e4/68747470733a2f2f636f6465636f762e696f2f67682f6d696b656672616e6369732f6c61726176656c2d756e6c656173682f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/mikefrancis/laravel-unleash)

An [Unleash](https://unleash.github.io) client for Laravel.

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

[](#installation)

```
composer require mikefrancis/laravel-unleash
```

Export package config:

```
php artisan vendor:publish --provider="MikeFrancis\LaravelUnleash\ServiceProvider"
```

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

[](#configuration)

Documentation for configuration can be found in [config/unleash.php](https://github.com/mikefrancis/laravel-unleash/blob/master/config/unleash.php).

Usage
-----

[](#usage)

```
use \MikeFrancis\LaravelUnleash\Unleash;

$unleash = app(Unleash::class);

if ($unleash->isFeatureEnabled('myAwesomeFeature')) {
  // Congratulations, you can see this awesome feature!
}

if ($unleash->isFeatureDisabled('myAwesomeFeature')) {
  // Check back later for more features!
}

$feature = $unleash->getFeature('myAwesomeFeature');

$allFeatures = $unleash->getFeatures();
```

### Facades

[](#facades)

You can use the `Unleash` facade:

```
use Unleash;

if (Unleash::isFeatureEnabled('myAwesomeFeature')) {
  // Congratulations, you can see this awesome feature!
}

if (Unleash::isFeatureDisabled('myAwesomeFeature')) {
  // Check back later for more features!
}

$feature = Unleash::getFeature('myAwesomeFeature');

$allFeatures = Unleash::getFeatures();
```

or use the generically named `Feature` facade:

```
use Feature;

if (Feature::enabled('myAwesomeFeature')) {
  // Congratulations, you can see this awesome feature!
}

if (Feature::disabled('myAwesomeFeature')) {
  // Check back later for more features!
}

$feature = Feature::get('myAwesomeFeature');

$allFeatures = Feature::all();
```

### Dynamic Arguments

[](#dynamic-arguments)

If your strategy relies on dynamic data at runtime, you can pass additional arguments to the feature check functions:

```
use \MikeFrancis\LaravelUnleash\Unleash;
use Config;

$unleash = app(Unleash::class);

$allowList = config('app.allow_list');

if ($unleash->isFeatureEnabled('myAwesomeFeature', $allowList)) {
  // Congratulations, you can see this awesome feature!
}

if ($unleash->isFeatureDisabled('myAwesomeFeature', $allowList)) {
  // Check back later for more features!
}
```

### Blade

[](#blade)

Blade directive for checking if a feature is **enabled**:

```
@featureEnabled('myAwesomeFeature')
Congratulations, you can see this awesome feature!
@endfeatureEnabled
```

Or if a feature is **disabled**:

```
@featureDisabled('myAwesomeFeature')
Check back later for more features!
@endfeatureDisabled
```

You cannot currently use dynamic strategy arguments with Blade template directives.

### Middleware

[](#middleware)

This package includes middleware that will deny routes depending on whether a feature is enabled or not.

To use the middle, add the following to your `app/Http/Kernel.php`:

```
protected $routeMiddleware = [
    // other middleware
    'feature.enabled' => \MikeFrancis\LaravelUnleash\Middleware\FeatureEnabled::class,
    'feature.disabled' => \MikeFrancis\LaravelUnleash\Middleware\FeatureDisabled::class,
];
```

You can then use the middleware in your routes:

```
Route::get('/new-feature-path', function () {
    //
})->middleware('feature.enabled:myAwesomeFeature');

Route::get('/terrible-legacy-path', function () {
    //
})->middleware('feature.disabled:myAwesomeFeature');
```

or in your controllers like so:

```
class ExampleController extends Controller
{
    public function __construct()
    {
        $this->middleware('feature.enabled:myAwesomeFeature');
        // or
        $this->middleware('feature.disabled:myAwesomeFeature');
    }
}
```

You cannot currently use dynamic strategy arguments with Middleware.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity47

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~97 days

Recently: every ~190 days

Total

15

Last Release

1034d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/935b1f18dd34ab05e26762b56244398325bdb866f040e15c3b0314f32afae35b?d=identicon)[mikefrancis](/maintainers/mikefrancis)

---

Top Contributors

[![mikefrancis](https://avatars.githubusercontent.com/u/1672610?v=4)](https://github.com/mikefrancis "mikefrancis (14 commits)")[![dshafik](https://avatars.githubusercontent.com/u/58074?v=4)](https://github.com/dshafik "dshafik (4 commits)")[![tobiasneidig](https://avatars.githubusercontent.com/u/8065624?v=4)](https://github.com/tobiasneidig "tobiasneidig (3 commits)")[![robertatcd](https://avatars.githubusercontent.com/u/1477106?v=4)](https://github.com/robertatcd "robertatcd (2 commits)")[![codacy-badger](https://avatars.githubusercontent.com/u/23704769?v=4)](https://github.com/codacy-badger "codacy-badger (1 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (1 commits)")[![rneal-ck](https://avatars.githubusercontent.com/u/79883452?v=4)](https://github.com/rneal-ck "rneal-ck (1 commits)")[![laola1technik](https://avatars.githubusercontent.com/u/10976272?v=4)](https://github.com/laola1technik "laola1technik (1 commits)")[![DanTheDJ](https://avatars.githubusercontent.com/u/9961427?v=4)](https://github.com/DanTheDJ "DanTheDJ (1 commits)")[![gsmofgsm](https://avatars.githubusercontent.com/u/5298121?v=4)](https://github.com/gsmofgsm "gsmofgsm (1 commits)")[![Jimbolino](https://avatars.githubusercontent.com/u/5860587?v=4)](https://github.com/Jimbolino "Jimbolino (1 commits)")

---

Tags

feature-flagfeature-togglelaravelunleash

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/mikefrancis-laravel-unleash/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[nativephp/mobile

NativePHP for Mobile

82724.0k43](/packages/nativephp-mobile)[laragear/preload

Effortlessly make a Preload script for your Laravel application.

119363.5k](/packages/laragear-preload)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)

PHPackages © 2026

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