PHP code example of ambrion / evocms-feature-flags
1. Go to this page and download the library: Download ambrion/evocms-feature-flags 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/ */
ambrion / evocms-feature-flags example snippets
if ($flags->isEnabled('my_flag', context: ['user_role' => 'manager'])) {
// show the feature
}
bash
cd /core
php artisan package:installEvolutionCMS\FeatureFlags\FeatureFlagsServiceProvider"
php artisan migrate