Skip to content

Instantly share code, notes, and snippets.

@yatsenkolesh
Created June 21, 2022 15:17
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/7adef9fce946dc4dcc9037c467b7aff0 to your computer and use it in GitHub Desktop.
Save yatsenkolesh/7adef9fce946dc4dcc9037c467b7aff0 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