PHPackages                             clearlyip/laravel-flipt - 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. clearlyip/laravel-flipt

ActiveLibrary

clearlyip/laravel-flipt
=======================

A Flipt client for Laravel

2.0.0(1mo ago)0872↓38.5%[1 PRs](https://github.com/clearlyip/laravel-flipt/pulls)BSD-3-ClausePHPPHP ^8.4CI passing

Since Oct 9Pushed 1mo agoCompare

[ Source](https://github.com/clearlyip/laravel-flipt)[ Packagist](https://packagist.org/packages/clearlyip/laravel-flipt)[ RSS](/packages/clearlyip-laravel-flipt/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (31)Versions (5)Used By (0)

[![](https://raw.githubusercontent.com/flipt-io/flipt/refs/heads/v2/logo.svg)](https://raw.githubusercontent.com/flipt-io/flipt/refs/heads/v2/logo.svg)

Laravel-flipt was created by, and is maintained by **[Andrew Nagy](https://github.com/tm1000)**, the package is designed to allow Laravel to work with [Flipt](https://flipt.io/)

[![Total Downloads](https://camo.githubusercontent.com/1e1b1a99ae9d4d793d8fbd50d054f3748f76b6484449a2fb880745be1265fa92/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636c6561726c7969702f6c61726176656c2d666c697074)](https://packagist.org/packages/clearlyip/laravel-flipt)[![Latest Stable Version](https://camo.githubusercontent.com/411d720d51a94675780b959512d70ec0b73ae09217b1ceb26a323ff6e1cc4caa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636c6561726c7969702f6c61726176656c2d666c697074)](https://packagist.org/packages/clearlyip/laravel-flipt)[![License](https://camo.githubusercontent.com/cd1d7d5f343f557d0b471e9876c6d8ec6335c1c16529a949f615ad7bb1b7fad5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636c6561726c7969702f6c61726176656c2d666c697074)](https://packagist.org/packages/clearlyip/laravel-flipt)

Features
--------

[](#features)

- Registers as a driver for [Laravel Pennant](https://github.com/laravel/pennant)
- Registers a Flipt client class to access the API directly
- Utilizes Laravel's cache system to store flags in cache for quick access with configurable TTL
- Supports boolean and variant flag evaluation
- Supports batch evaluation via the `clientevaluation` API
- Provides access to Flipt's Environments, Flags, Evaluate, OpenFeature, and Internal APIs
- Ships with Artisan commands to clear flag caches globally or per user

Installation &amp; Usage
------------------------

[](#installation--usage)

> **Requires [PHP 8.4+](https://php.net/releases/)**

Require Laravel-flipt using [Composer](https://getcomposer.org):

```
composer require clearlyip/laravel-flipt
```

Laravel Version Compatibility
-----------------------------

[](#laravel-version-compatibility)

LaravelLaravel Flipt12.x1.x12.x, 13.x2.xUsage
-----

[](#usage)

### Configuration Files

[](#configuration-files)

Publish the Laravel Flipt configuration file using the `vendor:publish` Artisan command. The `flipt` configuration file will be placed in your `config` directory (use `--force` to overwrite an existing config file):

```
php artisan vendor:publish --tag="flipt" [--force]
```

All options are fully documented in the published configuration file.

Key environment variables:

VariableDefaultDescription`FLIPT_HOST``null`The Flipt API host URL`FLIPT_NAMESPACE``null`The Flipt namespace`FLIPT_ENVIRONMENT``local`The Flipt environment### Pennant

[](#pennant)

Register the driver for [Laravel Pennant](https://github.com/laravel/pennant) in the `pennant.php` configuration file:

```
'default' => env('PENNANT_STORE', 'flipt'),
'stores' => [
    'array' => [
        'driver' => 'array',
    ],

    'flipt' => [
        'driver' => 'flipt',
    ],
],
```

### User Identity

[](#user-identity)

Use the [hasFeatures](https://laravel.com/docs/12.x/pennant#the-has-features-trait) trait on your User model.

Configure what parameters to use for `entityId` and context in the flipt configuration file. Dot notation is supported for nested model attributes:

```
'identity' => [
    'identifier' => 'id',
    'context' => [
        'email' => 'email',
        'my-value' => 'dot.notation.is.supported',
    ],
],
```

### Accessing the Flipt Client

[](#accessing-the-flipt-client)

The `Flipt` class can be resolved through Laravel's service container:

```
use Clearlyip\LaravelFlipt\Flipt;

$flipt = App::make(Flipt::class);
```

The client exposes the following API modules as magic properties:

PropertyClassDescription`$flipt->evaluate``Flipt\Evaluate`Boolean and variant flag evaluation`$flipt->clientevaluation``Flipt\ClientEvaluation`Batch/client-side evaluation`$flipt->openfeature``Flipt\OpenFeature`OpenFeature-compatible evaluation`$flipt->environments``Flipt\Environments`Manage Flipt environments`$flipt->flags``Flipt\Flags`List and retrieve flag definitions`$flipt->internal``Flipt\Internal`Internal Flipt API access#### Disabling the Cache

[](#disabling-the-cache)

To skip the cache for a single call chain, use `withSkipCache()`:

```
$flipt->withSkipCache()->evaluate->boolean($request);
```

### Artisan Commands

[](#artisan-commands)

CommandDescription`php artisan flipt:cache:clear`Clear all cached Flipt flag responses`php artisan flipt:cache:user:clear {userId}`Clear cached flags for a specific user### Caching

[](#caching)

The package uses Laravel's cache system to cache Flipt API responses. Configure the cache behavior in `config/flipt.php`:

```
'cache' => [
    'store'  => env('FLIPT_CACHE_STORE', 'default'),
    'prefix' => env('FLIPT_CACHE_PREFIX', 'flipt'),
    'ttl'    => env('FLIPT_CACHE_TTL', 60),
    'tags'   => ['flipt'],
],
```

The cache store must support tagging (e.g., Redis, Memcached) for the cache-clearing commands to work correctly.

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

[](#contributing)

Contributions are welcome. Please open an issue or pull request on [GitHub](https://github.com/clearlyip/laravel-flipt).

License
-------

[](#license)

Laravel-flipt is open-sourced software licensed under the [MIT License](LICENSE).

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance89

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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

Total

3

Last Release

55d ago

Major Versions

1.0.1 → 2.0.02026-03-24

### Community

Maintainers

![](https://www.gravatar.com/avatar/2ec0eab735e90845e372e877f867df9d50957c7aeb79437b13863aa1d299e188?d=identicon)[tm1000](/maintainers/tm1000)

---

Top Contributors

[![tm1000](https://avatars.githubusercontent.com/u/564256?v=4)](https://github.com/tm1000 "tm1000 (5 commits)")

###  Code Quality

TestsPest

Static AnalysisPsalm, Rector

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/clearlyip-laravel-flipt/health.svg)

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11120.2M21](/packages/anourvalar-eloquent-serialize)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

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