Download the PHP package featurit/featurit-sdk-laravel without Composer

On this page you can find all versions of the php package featurit/featurit-sdk-laravel. 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 featurit-sdk-laravel

FeaturIT SDK for Laravel

Laravel wrapper of the PHP client for the FeaturIT Feature Flag management platform.

Description

This package aims to simplify the integration of the FeaturIT API in a Laravel project.

Getting started

Dependencies

Installing

composer require featurit/featurit-sdk-laravel

If there's no package providing psr/http-client-implementation, visit https://packagist.org/providers/psr/http-client-implementation and choose the package that better suits your project.

If there's no package providing psr/simple-cache-implementation, visit https://packagist.org/providers/psr/simple-cache-implementation and choose the package that better suits your project.

Inside your config/app.php file, in the providers array add:

If you want to publish the default configuration file in order to customize things like the default FeaturitUserContextProvider, use the following command:

php artisan vendor:publish --provider="Featurit\Client\Laravel\FeaturitServiceProvider"

Basic Usage

That's how you would use Featurit in one of your controllers, services, or anywhere inside your PHP codebase:

Or in order to check which is the version of your feature:

Blade directives

For convenience we provide 3 blade directives which allow to load blade components depending on the Feature Flag values.

Inside your blade template, you can use them like this:

Defining your FeaturitUserContext

In order to show different versions of a feature to different users, Featurit needs to know about the attributes your user has in a certain context.

You can define the context using the as follows:

Defining a custom FeaturitUserContextProvider

This is an alternative to using Featurit::setUserContext(...);.

By default, Featurit SDK for Laravel comes with a default FeaturitUserContextProvider in your config/featurit.php file

But you can create your own implementation in order to add custom attributes so they can be used in the segmentation process.

Let's say that your platform users have a "role" attribute that you use to decide which features you show to each user. In that case you could create an implementation like:

Then you must replace your implementation in the config/featurit.php file

And that should do it, from now on your segmentation rules will use the role attribute.

Authors

FeaturIT

https://www.featurit.com

[email protected]


All versions of featurit-sdk-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0.2
ext-json Version *
featurit/featurit-sdk-php Version ^0.8.0
illuminate/support Version ^5.1 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.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 featurit/featurit-sdk-laravel contains the following files

Loading the files please wait ....