PHP code example of rasuvaeff / yii3-feature-flags-ui
1. Go to this page and download the library: Download rasuvaeff/yii3-feature-flags-ui 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/ */
rasuvaeff / yii3-feature-flags-ui example snippets
use Rasuvaeff\Yii3FeatureFlagsUi\FlagRoutes;
return [
FlagRoutes::PARAM_KEY => [
'route_prefix' => '/admin/flags',
'layout' => null,
'views' => [
'list' => '/abs/path/to/flags-list.php',
'edit' => '/abs/path/to/flags-edit.php',
],
'middlewares' => [
'all' => [AuthMiddleware::class],
],
// RequestBodyParser is added automatically to POST routes (store, update, delete).
// Set 'body_parser' => false if your pipeline already applies it globally.
],
];
use Rasuvaeff\Yii3FeatureFlags\{FlagProvider, WritableFlagProvider};
use Rasuvaeff\Yii3FeatureFlagsDb\DbFlagProvider;
return [
FlagProvider::class => DbFlagProvider::class,
WritableFlagProvider::class => Reference::to(FlagProvider::class),
];