diff --git a/README.md b/README.md index 2ecb479..3028c2b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Laravel Unleash -[![Codacy Badge](https://api.codacy.com/project/badge/Grade/56b0c6402eca49169cbeb3f404c2bff9)](https://app.codacy.com/manual/mikefrancis/laravel-unleash?utm_source=github.com&utm_medium=referral&utm_content=mikefrancis/laravel-unleash&utm_campaign=Badge_Grade_Dashboard) -[![Packagist](https://img.shields.io/packagist/v/mikefrancis/laravel-unleash)](https://packagist.org/packages/mikefrancis/laravel-unleash) [![Build Status](https://github.com/mikefrancis/laravel-unleash/workflows/CI/badge.svg)](https://github.com/mikefrancis/laravel-unleash/actions?query=workflow%3ACI) [![codecov](https://codecov.io/gh/mikefrancis/laravel-unleash/branch/master/graph/badge.svg)](https://codecov.io/gh/mikefrancis/laravel-unleash) +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/56b0c6402eca49169cbeb3f404c2bff9)](https://app.codacy.com/manual/laravel-unleash/laravel-unleash?utm_source=github.com&utm_medium=referral&utm_content=laravel-unleash/laravel-unleash&utm_campaign=Badge_Grade_Dashboard) +[![Packagist](https://img.shields.io/packagist/v/laravel-unleash/laravel-unleash)](https://packagist.org/packages/laravel-unleash/laravel-unleash) [![Build Status](https://github.com/laravel-unleash/laravel-unleash/workflows/CI/badge.svg)](https://github.com/laravel-unleash/laravel-unleash/actions?query=workflow%3ACI) [![codecov](https://codecov.io/gh/laravel-unleash/laravel-unleash/branch/main/graph/badge.svg)](https://codecov.io/gh/laravel-unleash/laravel-unleash) An [Unleash](https://unleash.github.io) client for Laravel. @@ -14,17 +14,17 @@ composer require mikefrancis/laravel-unleash Export package config: ```bash -php artisan vendor:publish --provider="MikeFrancis\LaravelUnleash\ServiceProvider" +php artisan vendor:publish --provider="LaravelUnleash\ServiceProvider" ``` ## Configuration -Documentation for configuration can be found in [config/unleash.php](https://github.com/mikefrancis/laravel-unleash/blob/master/config/unleash.php). +Documentation for configuration can be found in [config/unleash.php](https://github.com/laravel-unleash/laravel-unleash/blob/main/config/unleash.php). ## Usage ```php -use \MikeFrancis\LaravelUnleash\Unleash; +use LaravelUnleash\Unleash; $unleash = app(Unleash::class); @@ -84,7 +84,7 @@ $allFeatures = Feature::all(); If your strategy relies on dynamic data at runtime, you can pass additional arguments to the feature check functions: ```php -use \MikeFrancis\LaravelUnleash\Unleash; +use LaravelUnleash\Unleash; use Config; $unleash = app(Unleash::class); @@ -129,8 +129,8 @@ To use the middle, add the following to your `app/Http/Kernel.php`: ```php protected $routeMiddleware = [ // other middleware - 'feature.enabled' => \MikeFrancis\LaravelUnleash\Middleware\FeatureEnabled::class, - 'feature.disabled' => \MikeFrancis\LaravelUnleash\Middleware\FeatureDisabled::class, + 'feature.enabled' => \LaravelUnleash\Middleware\FeatureEnabled::class, + 'feature.disabled' => \LaravelUnleash\Middleware\FeatureDisabled::class, ]; ``` @@ -160,4 +160,4 @@ class ExampleController extends Controller } ``` -You cannot currently use dynamic strategy arguments with Middleware. \ No newline at end of file +You cannot currently use dynamic strategy arguments with Middleware. diff --git a/composer.json b/composer.json index e771168..d905c77 100644 --- a/composer.json +++ b/composer.json @@ -14,12 +14,12 @@ }, "autoload": { "psr-4": { - "MikeFrancis\\LaravelUnleash\\": "src/" + "LaravelUnleash\\": "src/" } }, "autoload-dev": { "psr-4": { - "MikeFrancis\\LaravelUnleash\\Tests\\": "tests/" + "LaravelUnleash\\Tests\\": "tests/" } }, "license": "MIT", @@ -32,11 +32,11 @@ "extra": { "laravel": { "providers": [ - "MikeFrancis\\LaravelUnleash\\ServiceProvider" + "LaravelUnleash\\ServiceProvider" ], "aliases": { - "Unleash": "MikeFrancis\\LaravelUnleash\\Facades\\Unleash", - "Feature": "MikeFrancis\\LaravelUnleash\\Facades\\Feature" + "Unleash": "LaravelUnleash\\Facades\\Unleash", + "Feature": "LaravelUnleash\\Facades\\Feature" } } } diff --git a/config/unleash.php b/config/unleash.php index 8607868..8a33474 100644 --- a/config/unleash.php +++ b/config/unleash.php @@ -38,13 +38,13 @@ // Mapping of strategies used to guard features on Unleash. The default strategies are already // mapped below, and more strategies can be added - they just need to implement the - // `\MikeFrancis\LaravelUnleash\Strategies\Strategy` or - // `\MikeFrancis\LaravelUnleash\Strategies\DynamicStrategy` interface. If you would like to disable + // `\LaravelUnleash\Strategies\Strategy` or + // `\LaravelUnleash\Strategies\DynamicStrategy` interface. If you would like to disable // a built-in strategy, please comment it out or remove it below. 'strategies' => [ - 'applicationHostname' => \MikeFrancis\LaravelUnleash\Strategies\ApplicationHostnameStrategy::class, - 'default' => \MikeFrancis\LaravelUnleash\Strategies\DefaultStrategy::class, - 'remoteAddress' => \MikeFrancis\LaravelUnleash\Strategies\RemoteAddressStrategy::class, - 'userWithId' => \MikeFrancis\LaravelUnleash\Strategies\UserWithIdStrategy::class, + 'applicationHostname' => \LaravelUnleash\Strategies\ApplicationHostnameStrategy::class, + 'default' => \LaravelUnleash\Strategies\DefaultStrategy::class, + 'remoteAddress' => \LaravelUnleash\Strategies\RemoteAddressStrategy::class, + 'userWithId' => \LaravelUnleash\Strategies\UserWithIdStrategy::class, ], ]; diff --git a/src/Client.php b/src/Client.php index 1f5cbfd..6725fce 100644 --- a/src/Client.php +++ b/src/Client.php @@ -1,6 +1,6 @@