Download the PHP package matthiaswilbrink/laravel-feature-toggles without Composer

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

Laravel feature toggles

Toggle parts of you application on or off with zero downtime.

Deploy your feature at night, toggle it when your boss hits that big red button.
(big red button not included)

Features

Installation

This package is available on composer.
To install laravel-feature-toggles you can run the following command

After installation you can publish the configuration with this command

As this package uses a database to keep track of the features' state, you'll have to migrate after installing this package

Usage

Command Purpose
feature:create Read features from the config and inserts them into the database. Once inserted, it will never be overwritten.
feature:list List all features in the database.
feature:enable Enable a feature, pick from list.
feature:disable Disable a feature, pick from list.
feature:clear-cache Clear the feature cache, features will be stored in cache again when they are called for the first time.

Reading

Blade

A custom blade directive has been made.
In a blade file do the following:

The else clause could also be used.

Helper

The helper function feature(string $name) return the state of the given feature.

Facade

An alias has been registered.

Dependency Injection

Of course you can inject the FeatureManager to accomplish the same goal.

Other activities

You might also want to allow your users to enable or disable features. (Things like a Christmas theme come to mind)

A note on caching

If caching is turned on, the cache is cleared and rebuild every time a feature is enabled/disabled.
Might the need arise you can always flush the cache with php artisan feature:clear-cache.
This will only flush the feature cache, not your regular application cache.


All versions of laravel-feature-toggles with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
illuminate/config Version 5.8.*|6.*
illuminate/console Version 5.8.*|6.*
illuminate/database Version 5.8.*|6.*
illuminate/support Version 5.8.*|6.*
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 matthiaswilbrink/laravel-feature-toggles contains the following files

Loading the files please wait ....