Laravel Magazine
Feature Flags Made Simple with Laravel Pennant
Featured

Feature Flags Made Simple with Laravel Pennant

Feature flags are one of those things that seem like overkill until the day you desperately need one. You're in the middle of a deployment, something's wrong with the new checkout flow for 3% of users, and instead of a rollback, you flip a flag and the problem disappears in seconds. Laravel Pennant is the first-party answer to this need. It's lightweight, integrates naturally with Laravel, and has a clean API that gets out of your way. This tutorial covers everything from installation to running a proper percentage-based rollout. Installation composer require laravel/pennant php artisan vendor:publish --provider="Laravel\Pennant\PennantServiceProvider" php artisan migrate Publishing the service provider creates a config/pennant.php configuration file and a features migration. The migration adds a features table that Pennant's database driver uses to store resolved flag values. Storage Drivers Pennant supports two storage drivers. The array driver stores resolved values in memory for th...

Recent Articles

Latest Links

Stay Updated

Subscribe to our newsletter

Get latest news, tutorials, community articles and podcast episodes delivered to your inbox.

Weekly articles
We send a new issue of the newsletter every week on Friday.
No spam
We'll never share your email address and you can opt out at any time.