PHP code example of switchover / laravel-integration
1. Go to this page and download the library: Download switchover/laravel-integration 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/ */
switchover / laravel-integration example snippets
class HomeController extends Controller
{
public function index() {
$userCtx = new Context([
'email' => Auth::user()->email;
])
$coolNewFeatures = Switchover::toggleValue('cool-feature', false, $userCtx);
return //...
}
}
bash
php artisan vendor:publish --tag="switchover-config"