clearlyip / laravel-flipt
A Flipt client for Laravel
Installs: 21
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 1
pkg:composer/clearlyip/laravel-flipt
Requires
- php: ^8.4
- cuyz/valinor: ^2.2.0
- laravel/framework: ^12.32.5
- laravel/pennant: ^1.18
- spatie/php-cloneable: ^1.0
Requires (Dev)
- blastcloud/guzzler: 2.3.0
- brianium/paratest: ^7.11.0
- guzzlehttp/guzzle: ^7.10.0
- guzzlehttp/psr7: ^2.8.0
- mockery/mockery: ^1.6.12
- orchestra/testbench: ^10.4.0
- pestphp/pest: ^4.1
- rector/rector: ^2.1.4
- squizlabs/php_codesniffer: ^3.13.4
- symfony/cache: ^7.3.2
- vimeo/psalm: ^6.13.0
- vlucas/phpdotenv: ^5.6.2
This package is auto-updated.
Last update: 2025-10-09 06:00:04 UTC
README
Laravel-flipt was created by, and is maintained by Andrew Nagy, the package is designed to allow Laravel to work with Flipt
Features
- Registers as a driver for 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
Installation & Usage
Requires PHP 8.4+
Require Laravel-flipt using Composer:
composer require clearlyip/laravel-flipt
Laravel Version Compatibility
Laravel | Laravel Flipt |
---|---|
12.x | 1.x |
Usage
Configuration Files
- Publish the Laravel Flipt configuration file using the
vendor:publish
Artisan command. Theflipt
configuration file will be placed in yourconfig
directory (Use--force
to overwrite your existingclearly
config file):php artisan vendor:publish --tag="flipt" [--force]
All options are fully documented in the configuration file
Pennant
Register the driver for Laravel Pennant in the pennant.php
configuration file
'default' => env('PENNANT_STORE', 'flipt'), 'stores' => [ 'array' => [ 'driver' => 'array', ], 'flipt' => [ 'driver' => 'flipt', ], ],
User
Use the hasFeatures trait on your User model
Configure what parameters to use for entityId and context in the flipt configuration file
'identity' => [ 'identifier' => 'id', 'context' => [ 'email' => 'email', 'my-value' => 'dot.notation.is.supported', ], ],
Accessing
The Flipt Class can be accessed through Laravel's Container. The returned class is https://github.com/clearlyip/laravel-flipt
$flipt = App::make(Flipt::class);