Download the PHP package amirhf1/feature-toggle without Composer

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

FeatureToggle

Packagist License PHP Version Total Downloads

FeatureToggle is a Laravel package that provides a simple and flexible way to manage feature flags within your application. Enable or disable features on the fly without deploying new code, enhancing your application's flexibility and allowing for better control over feature releases.

Table of Contents

Features

Installation

You can install the package via Composer:

Configuration

After installation, publish the configuration and migration files:

Then, run the migrations to create the features table:

Note: For Laravel versions >=5.5, the package uses Package Auto-Discovery, so manual registration of the service provider and facade is not required. For older versions, refer to the Installation section.

Usage

Checking Feature Status

Use the FeatureToggle facade to check if a feature is enabled:

Enabling/Disabling Features

Enable or disable features programmatically:

Middleware

Protect your routes based on feature flags by using the provided middleware.

  1. Register Middleware:

    The middleware is automatically registered by the package. If not, ensure it's registered in your FeatureToggleServiceProvider.

  2. Apply Middleware to Routes:

    If the feature is disabled, accessing /new-dashboard will result in a 404 error or a custom response as defined.

Blade Directives

Conditionally display content in your Blade templates using the @feature directive.

Database Setup

The package uses a features table to store feature flags. After publishing and running the migrations, you can manage features via Eloquent models or directly through the database.

Seeding Default Features

Optionally, you can create a seeder to populate default features:

Run the seeder:

Contributing

Contributions are welcome! Please follow these steps to contribute:

  1. Fork the Repository
  2. Create a Feature Branch

  3. Commit Your Changes

  4. Push to the Branch

  5. Open a Pull Request

Please ensure your code adheres to the project's coding standards and includes appropriate tests.

License

The MIT License (MIT). Please see LICENSE for more information.


All versions of feature-toggle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
illuminate/support Version ^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 amirhf1/feature-toggle contains the following files

Loading the files please wait ....