Download the PHP package j-webb/laravel-unleash without Composer

On this page you can find all versions of the php package j-webb/laravel-unleash. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-unleash

Laravel Unleash

A simple Unleash component for Laravel. It is compatible with the Unlesah-hosted.com SaaS offering, Unleash Open-Source, and GitLab's Feature Flag system, which is built on Unleash.

V2 of this package is a wrapper and extension of the Unleash PHP SDK that is compatible with Laravel.

Getting started

1. Install the Laravel Unleash via Composer

2. Configure

Create local configuration (optional)

Required .env values

Optional .env values

Setting up the Middleware

The module comes bundled with middleware for you to perform a feature check on routes and/or controllers.

Once added to your Kernel.php file, you can use this in any area where middleware is applicable. As an example, you could use this in a controller.

See the Laravel Docs for more information.

Setting up a custom cache handler

If the cache option is enabled, by default the component will use the Laravel Cache module. By utilizing the UnleashCacheHandlerInterface, you can create your own PSR-16 compatible implementation and override the unleash.cache.handler config value with your handler class.

Setting up custom strategies

To add your own strategy, you can override or create your own Strategies Provider. A UnleashStrategiesProviderInterface is included for convenience. Once your custom class is build, you should modify the unleash.strategy_provider config value.

Overwriting default context provider

If you want to send more context by default, you can overwrite the UnleashContextProvider. Make sure that your class implements the Unleash\Client\ContextProvider\UnleashContextProvider interface (to prevent confusion with the UnleashContextProvider in this package, an option would be to alias it). After that, change the config value of unleash.context_provider to your custom created class.

Usage

Checking individual features

Using array of features.

Note: The result matches that which would be returned from the official Unleash Proxy instances. This means you could use your Laravel application as an Unleash Proxy endpoint, which is compatible with the official client-side Unleash Proxy SDKs

Using middleware on a controller

Using middleware on a route

Because the component is a wrapper of the official Unleash Client SDK, you can pass relevant context to your checks:

Note: User ID information is automatically added to the context using the Laravel Auth module

Or get variant information

Blade

You can use the Unleash Blade directive for checking if a feature is enabled in your Blade templates:

Or if a feature is disabled:


All versions of laravel-unleash with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^7
illuminate/support Version ^6|^7|^8|^9|^10.0|^11.0
illuminate/http Version ^6|^7|^8|^9|^10.0|^11.0
unleash/client Version ^1
symfony/cache Version ^5.3|^6.1
psr/cache Version ^1.0|^2.0|^3.0
psr/simple-cache Version ^1.0|^2.0|^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package j-webb/laravel-unleash contains the following files

Loading the files please wait ....