PHP code example of eekay / abtest

1. Go to this page and download the library: Download eekay/abtest library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

eekay / abtest example snippets


Abtest::pageView()

// get the underlying model
Abtest::getExperiment()

// get the experiment name
Abtest::getExperiment()->name

// get the visitor count
Abtest::getExperiment()->visitors

public function index(Request $request) {
    // the same as 'Abtest::getExperiment()'
    $request->abExperiment()
}

Abtest::completeGoal('signup')

Abtest::getCompletedGoals()
bash
php artisan vendor:publish --provider="EeKay\abtest\AbtestServiceProvider"

$ php artisan vendor:publish
bash
php artisan migrate
bash
php artisan ab:report
bash
php artisan ab:reset