Free
€0.00 / month
For evaluation and side projects.
- Every feature, no time limit
- Unlimited traffic & evaluations
- 1 Project and member
- 1 Active experiment
- 1-month data retention
FlagPal for Laravel is a Pennant driver. Keep Feature::active() and @feature as they are. Behind them you get a dashboard for remote config, targeting rules, A/B tests and metrics that the rest of your team can use too, and changes there don't need a deploy.
PHP 8.2+ · Laravel 11 or 12 · No credit card required
use Laravel\Pennant\Feature;
// Same Pennant API you already use
if (Feature::active('new-checkout')) {
// show the new checkout
}
// Pennant's Blade directives keep working, too
@feature('beta-theme')
<link rel="stylesheet" href="beta.css">
@endfeature
// Remote config: read the value FlagPal serves
$color = Feature::value('checkout-button-color');
There's no new API to learn. The driver plugs into Pennant's store layer, so your feature checks stay plain Laravel and the values come from the dashboard.
Why FlagPal for Laravel
Pennant has a nice feature-flag API, but nowhere to manage flags, target users, run experiments or look at results. The FlagPal driver adds that, behind the same calls you already use.
FlagPal for Laravel is a Pennant driver, so Feature::active(), Feature::value() and Pennant's Blade directives work the same as before. What changes is where the values come from: a dashboard where you can adjust rollout percentages, targeting rules and experiment variants without deploying.
Flags can be boolean, string, integer, array or date. That means a rate limit, a payment gateway or a simple on/off becomes a value you edit in the dashboard rather than a code change.
Any property your app sends (country, plan, signup_date and so on) can be used in targeting rules, and rules combine with AND. Flags set by one Experience carry over to the next, so you can chain them without writing if/else.
Split matched users across variants by weight and attach a metric (boolean, count or money). The dashboard shows conversion per variant, how likely each one is to be the best, and whether the result is statistically significant.
The driver caches resolved flags in whichever cache store you pick, so reads stay local. If you add FlagPal's signed webhooks, changes saved in the dashboard reach your app as soon as they're made.
Evaluation happens in your app, so we don't meter requests, users or evaluations. Whether you have 100 users or 100 million, the bill is the same.
You install the official Laravel SDK once (it talks to a JSON:API REST backend). After that, product managers, marketers and analysts can create flags, target users, run experiments and read results in the dashboard without waiting on a deploy.
How it works
You install the driver once (the four steps are below). After that, flags, targeting, experiments and results all live in the dashboard, and the only extra code is one middleware and one metric call. The concepts match the docs (opens in a new tab): Feature Flags, Experiences, Experiments and Metrics.
Dashboard · any role
Create typed flags in the dashboard (boolean, string, integer, array or date) and read them through Pennant. checkout-button-color is a string flag, so your code calls Feature::value() instead of hardcoding "blue" or "green".
Users in this variant get and =
Try it: change a flag or its value, or add another one.
Dashboard · product and marketing
An Experience gives one feature set to everyone who matches your rules. An Experiment splits those users across variants by weight. Rules use the properties your app sends as flags, like country, plan or signup_date, and combine with AND. Start with a small slice of traffic and increase it from the dashboard.
Who takes part · all rules must match
Users where and
Start small, raise it when you are confident. Everyone else keeps the blue button.
What each group sees · split by weight
checkout-button-color = "blue"
checkout-button-color = "green"
Try it: edit the targeting rules or move the traffic slider.
Code once · dashboard after
Register the RecordEnteredExperiments middleware once and the SDK will count who saw each variant after the response goes out. When a user converts, call recordMetric(). The dashboard shows conversion per variant, the probability each one is best, and when the result becomes statistically significant. Then one switch turns the winner into an Experience for everyone.
// bootstrap/app.php - count who saw each variant, after the response is sent
->withMiddleware(function (Middleware $middleware) {
$middleware->append(\FlagPal\FlagPal\Http\Middleware\RecordEnteredExperiments::class);
})
// When the purchase completes, record the conversion against the variant they saw
foreach ($flagPal->getEnteredFunnels() as $entry) {
$flagPal->recordMetric(new Metric(['name' => 'conversion']), $entry->set, 1);
}
1,010 users · 30 conversions
1,017 users · 51 conversions
+69% conversion · 99% probability to be best
Green button for everyone Draft
Sets checkout-button-color = "green"
Turn the winning variant into an Experience for every user.
Try it: flip the switch to roll the winner out to everyone.
Get started
Since FlagPal for Laravel is a Pennant driver, installing it means one Composer package, one config file and four environment keys.
Just one Composer package. It registers the flagpal Pennant store for you, so you don't need to touch config/pennant.php.
composer require flagpal/flagpal-for-laravel
This creates config/flagpal.php, where projects, caching and logging are configured. The defaults work fine for a single project.
php artisan vendor:publish --tag="flagpal-for-laravel-config"
Paste in the API URL and token from your FlagPal project, then make flagpal Pennant's default store. If you skip that, Feature::active() will keep using the database driver.
FLAGPAL_URL=https://flagpal.com/api/v1
FLAGPAL_PROJECT="My Project"
FLAGPAL_MY_PROJECT_TOKEN=your-token-here
PENNANT_STORE=flagpal
This is plain Pennant. new-checkout is a flag you define in the dashboard, where you can flip it, target it or split it without a deploy.
use Laravel\Pennant\Feature;
if (Feature::active('new-checkout')) {
// show the new checkout
}
Pricing
Flags are evaluated inside your app, so we have nothing to meter and don't charge per seat or per request. Pick a plan and invite whoever needs access.
€0.00 / month
For evaluation and side projects.
€5.99 / month
For one product and the people shipping it.
€9.99 / month
For teams running several products.
Flags are resolved from a local cache in your app, so there are no requests or users for us to count. A traffic spike costs the same as a quiet Tuesday.
Bring in developers, PMs, marketers and analysts. Adding people to the dashboard doesn't change the price.
The free plan has every feature and doesn't expire. Upgrade once FlagPal is running in production.
Prices in EUR, billed monthly. Questions about billing or setup? Read the FAQ.
FAQ
Pennant, caching, security and results, in short. The docs and the SDK README have the details.
The docs have the full FAQ and all the guides, from creating your first flag to reading results.
No, it plugs into it. FlagPal for Laravel registers a flagpal Pennant store, so Feature::active(), Feature::value() and Pennant's Blade directives keep working as before. Set PENNANT_STORE=flagpal and the values behind them (rollout percentages, targeting rules, experiment variants) come from the dashboard, where you can change them without deploying.
Not using Pennant? The SDK also works on its own. FlagPal::resolveFeatures() returns the resolved feature array.
Every plan is a flat monthly fee, whatever your traffic. The driver resolves flags from a local cache and FlagPal only tells your app what changed, so there are no requests, users or evaluations for us to meter. As a bonus, fewer round trips mean faster responses and one less thing in your request path that can fail.
Under a millisecond once it's cached. The driver keeps resolved flags in whichever cache store you pick (set the store and TTL in config/flagpal.php), so requests read from the cache instead of calling FlagPal every time. If you want changes to land immediately, add a webhook endpoint. FlagPal sends a signed event whenever a flag, Experience or Experiment changes, and your app refreshes its cache.
Use an Experience to give one feature set to the users who match your rules, like a beta group, a country or a plan. It's also what you use for gradual rollouts. Use an Experiment when you want to split those users across variants by weight and see which one does better.
| Experience | Experiment | |
|---|---|---|
| Purpose | Roll out a feature | A/B test two+ variants |
| Variants | Single | Multiple |
| Needs metrics? | No | Yes |
Add the RecordEnteredExperiments middleware once and the SDK will record exposures automatically after the response is sent. When the goal happens (a purchase, a signup), call recordMetric() for the variant the user was in. There are three metric types: boolean (did it happen?), count (how many times?) and money (how much?). The dashboard turns them into conversion per variant, the probability each one is best, and whether the result is statistically significant.
The package comes with a cookie-backed GuestScope. Resolve Pennant's scope to the logged-in user, or fall back to the guest scope when there isn't one. Anonymous visitors then keep the same feature values and experiment variant across requests for the configured TTL (30 days by default).
API access uses bearer tokens scoped to a project. Every webhook is signed with HMAC-SHA256 in a Signature header. A webhook secret is required, so you can always verify a payload with a constant-time comparison before acting on it. Failed deliveries are retried with exponential backoff.
No. A developer sets up the driver once, and after that product managers, marketers and analysts can create flags, set up Experiences, run Experiments and read metrics in the dashboard without writing code. The only code involved is the flag check you'd have written anyway.
Get started
Sign up for free (no card needed), install the driver, point Pennant at FlagPal and read your first flag from the dashboard. It takes about five minutes.
What you get today
Want the full walkthrough first? The SDK README (opens in a new tab) walks through installing, setting up your first A/B test and recording conversions.