taskord / unleash
An Unleash client for Laravel
This package's canonical repository appears to be gone and the package has been frozen as a result.
0.0.6
2020-10-03 15:14 UTC
Requires
- guzzlehttp/guzzle: ^7.0
- illuminate/http: ^5.8|^6|^7|^8
- illuminate/support: ^5.8|^6|^7|^8
Requires (Dev)
- phpunit/phpunit: ^9.2
- squizlabs/php_codesniffer: ^3.5
README
Fork of https://github.com/mikefrancis/laravel-unleash
An Unleash client for Laravel.
Installation
composer require taskord/unleash
Export package config:
php artisan vendor:publish --provider="Taskord\LaravelUnleash\ServiceProvider"
Configuration
Documentation for configuration can be found in config/unleash.php.
Usage
use \Taskord\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
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