Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Abtest

Laravel Abtest Laravel Package

abrouter/laravel-abtest

Laravel A/B testing package from Abrouter for creating experiments, splitting users into variants, and tracking conversions with a simple facade. Integrates with Abrouter for feature flags, targeting, and analytics.

View on GitHub
Deep Wiki
Context7

ABRouter Laravel AB test is a simple package for the base library to run ab-tests and feature flags via ABRouter with Laravel. Prepare and run your ab-test in 10 minutes. Easy to manage and run. Can be also used as a feature flag or feature toggle. Free cloud version available for free. Completely open-source.

Frequently asked questions about Laravel Abtest
How do I install abrouter/laravel-abtest in a Laravel app?
Install it with composer require abrouter/laravel-abtest. Laravel's package auto-discovery registers the service provider and facade, so no manual registration is needed in most apps. Then publish the config file and set your ABRouter API token and host through environment variables.
Is abrouter/laravel-abtest free, and what license does it use?
The package itself is open-source and free to use, and ABRouter offers a free cloud tier. It is released under GPL-3.0, which is the main adoption risk for closed-source or SaaS products because many legal teams treat GPL Composer dependencies in proprietary code as requiring review. Get counsel sign-off before shipping it in a commercial application, or compare with MIT-licensed alternatives.
Can abrouter/laravel-abtest be used as a feature flag instead of a full A/B test?
Yes. The package is designed to serve both experiments and feature flags or feature toggles from the same ABRouter control plane. You can branch on a flag state for a simple on/off rollout, or on an experiment variant when you want to measure conversion differences between groups.
How does abrouter/laravel-abtest assign users to experiment variants?
Variant assignment happens in ABRouter, and the package passes an identifier for the current user at evaluation time so ABRouter can bucket them deterministically. The critical detail is consistency: use the same stable identifier across web requests, API calls, and queued jobs, otherwise the same user can land in different variants and invalidate your results. A common choice is Auth::id(), wrapped so it can be resolved reliably in every context.
What happens to my Laravel app if ABRouter is unreachable?
Every flag or variant evaluation is a potential network call to ABRouter, so an outage can surface directly in user requests if you have no fallback. Decide a fail-open or fail-closed policy per flag, return a sensible default variant, and test that path deliberately. Also confirm whether the package caches evaluations locally or calls the API on each request, since that determines your latency and reliability budget.
Does abrouter/laravel-abtest require an ABRouter account, or can I self-host?
You need an ABRouter control plane, and a free cloud version is available for getting started quickly. The core is open-source, so self-hosting is an option if you need data residency or want experiment configuration to stay inside your own infrastructure. Factor in the operational cost of running and maintaining that service before choosing self-hosting.
How do I track conversions for an experiment with abrouter/laravel-abtest?
The package facade lets you record conversion events that ABRouter attributes to the experiment and variant the user was exposed to. Call it from the place where the goal actually happens, such as a checkout controller, a job, or a listener, rather than from the view that renders the variant. Statistical analysis and reporting then live in the ABRouter dashboard, not in your Laravel code.
How do I test code that uses the ABRouter facade?
Because the package exposes a facade, you can swap or mock it in your test suite so tests never hit the ABRouter API. The more maintainable pattern is to wrap ABRouter behind your own FeatureFlags or ExperimentService interface and inject that, so tests fake your interface and the vendor namespace stays out of your domain code. That also makes swapping providers later far cheaper.
Which Laravel versions does abrouter/laravel-abtest support?
The package is a standard Composer library with a service provider and facade, so it works with modern Laravel releases that support package auto-discovery. Check the illuminate/support constraint in its composer.json before committing, and run your test suite after install to confirm the facade resolves correctly on your version. Pin the package version in composer.json so a minor release cannot change flag behavior unexpectedly.
What are the alternatives to abrouter/laravel-abtest for Laravel A/B testing?
Laravel Pennant is the first-party, MIT-licensed option for feature flags and is the natural baseline for simple toggles. For hosted experimentation and targeting you can compare LaunchDarkly, Unleash, Flagsmith, and GrowthBook, most of which are MIT or Apache licensed. ABRouter's differentiator is the combined A/B testing plus feature-flag control plane with a free tier, but weigh that against GPL-3.0 licensing, a small community, and single-vendor maintenance risk.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource