PHP code example of infi-nl / laravel-feature-toggle

1. Go to this page and download the library: Download infi-nl/laravel-feature-toggle 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/ */

    

infi-nl / laravel-feature-toggle example snippets



return array(
	"featureName1" => array(
		"enabled"      => true
	),
	...
	"featureNameN" => array(
		"enabled"      => false
	)
);

FeatureContainer::hasFeature("featureName");

$feature = FeatureContainer::getFeature("featureName");

$feature->isEnabled();