PHP code example of mwkcoding / laravel-feature-flags
1. Go to this page and download the library: Download mwkcoding/laravel-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/ */
mwkcoding / laravel-feature-flags example snippets
// Check if a feature is enabled in your backend logic
use Mwk\FeatureFlags\FeatureManagerFacade;
if (FeatureManagerFacade::feature('my-feature')->enabled()) {
// Your feature specific logic
}
@feature('my-feature')
<p>Feature turned on</p>
@endfeature
bash
php artisan vendor:publish --provider="Mwk\FeatureFlags\FeatureFlagsServiceProvider" --tag="config"