Skip to content

Instantly share code, notes, and snippets.

@yatsenkolesh
Created April 19, 2022 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yatsenkolesh/0be7838098a5fc8541d6335f1f14cbed to your computer and use it in GitHub Desktop.
Save yatsenkolesh/0be7838098a5fc8541d6335f1f14cbed to your computer and use it in GitHub Desktop.
<?php
declare(strict_types = 1);
namespace App\Http\Controllers;
use Abrouter\Client\Client;
class ExampleFeatureFlagsController
{
public function __invoke(Client $client)
{
$enabledButtonFeatureFlag = $client->featureFlags()
->run('enabled_button_feature_flag');
$disabledButtonFeatureFlag = $client->featureFlags()
->run('disabled_button_feature_flag');
return view('featureFlags', ['enabledButtonFeatureFlag' => $enabledButtonFeatureFlag, 'disabledButtonFeatureFlag' => $disabledButtonFeatureFlag, ]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment