Download the PHP package bastuijnman/flagpost without Composer
On this page you can find all versions of the php package bastuijnman/flagpost. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bastuijnman/flagpost
More information about bastuijnman/flagpost
Files in bastuijnman/flagpost
Package flagpost
Short Description Provides basic A/B test results for Laravel Pennant
License MIT
Informations about the package flagpost
Flagpost
Flagpost is a package that integrates with Laravel & Laravel Pennant to slightly enhance the basic A/B testing capabilities and lets you setup goals and track "conversion" rates.
Installation
Install Flagpost into your project:
When installed make sure you run the migrations to make sure conversions can be tracked in your database.
Usage
After defining your Laravel Pennant features you can track user conversions with them by using the Goal
facade. Flagpost aims to follow a similar interface to pennant, so in order to track a goal you would simply do
Which would mean that once you start listening a podcast you'd have reached the goal of your feature.
Scopes
Just like with Pennant you can specify the scope of your feature by doing
If you've defined a different Pennant default scope Flagpost should pick this up by default.
Results
Flagpost allows you to grab the results of your Pennant features through the following methods:
You can also retrieve timeseries data by doing the following:
When any of the default periods of Laravel Pulse are given in the timeseries
method Flagpost will automatically infer the "best" interval to display in a chart. However if you just want to retrieve data you can pass in the interval parameter like so:
Where the interval is specified in seconds
Pulse
Flagpost ships with a card for Pulse by default, if your application has installed Pulse you can configure a feature card as follows:
It will render a card that allows you to either view the total results or in a timeseries based on the selected period.
Testing
After cloning the repo and doing composer install
you can run
To run the test suite
All versions of flagpost with dependencies
illuminate/support Version ^10.0
laravel/pennant Version ^1.6
nesbot/carbon Version ^2.72
illuminate/contracts Version *