An Unleash client for Laravel.
composer require mikefrancis/laravel-unleash
Export package config:
php artisan vendor:publish --provider="MikeFrancis\LaravelUnleash\ServiceProvider"
Documentation for configuration can be found in config/unleash.php.
use \MikeFrancis\LaravelUnleash\Unleash;
$unleash = app(Unleash::class);
if ($unleash->isFeatureEnabled('myAwesomeFeature')) {
// Congratulations, you can see this awesome feature!
}
if ($unleash->isFeatureDisabled('myAwesomeFeature')) {
// Check back later for more features!
}
$allFeatures = $unleash->getFeatures();
Blade directive for checking if a feature is enabled:
@featureEnabled('myAwesomeFeature')
Congratulations, you can see this awesome feature!
@endfeatureEnabled
Or if a feature is disabled:
@featureDisabled('myAwesomeFeature')
Check back later for more features!
@endfeatureDisabled