1. Go to this page and download the library: Download filipe07/laravel-ab 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/ */
filipe07 / laravel-ab example snippets
AbTesting::pageView()
// get the underlying model
AbTesting::getVariant()
// get the variant name
AbTesting::getVariant()->name
// get the visitor count
AbTesting::getVariant()->visitors
public function index(Request $request) {
// the same as 'AbTesting::getVariant()'
$request->abVariant()
}