Download the PHP package webrek/laravel-feature-flags without Composer

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

Laravel Feature Flags

Latest Version on Packagist Total Downloads Tests PHP Version

Feature flags for Laravel with percentage rollouts, rule-based targeting and A/B variants — turn features on or off at runtime without a deploy.

Quick start

Why not just use your own boolean column

A boolean column on a settings table answers a single question: is it on for everyone? Real feature work needs more:

This package does all of that and, unlike Laravel Pennant, stores rollouts, constraints and variants as data you can manage — not just as closures in code.

Defining features

With the database store (the default), define and manage them at runtime:

Or declare them in code with the array store (ideal for tests or simple applications) — set FEATURE_FLAGS_STORE=array and populate config/feature-flags.php:

Checking features

A feature resolves as active only when every gate passes: the master switch is on, the scope satisfies all constraints, it falls within the rollout percentage and (for a feature with variants) a variant is assigned.

Scopes

Pass anything as a scope:

Targeting constraints

Each constraint is ['attribute' => ..., 'operator' => ..., 'value' => ...] and all of them must be satisfied. Supported operators:

= · != · in · not_in · > · >= · < · <= · contains

Blade and middleware

Artisan

Dashboard

A built-in web interface for toggling features, adjusting rollout and creating or deleting flags at runtime — no deploy, no database client. It is server-rendered (no JS build, no CDN) and lives at /feature-flags by default.

The dashboard controls your flags, so protect it. Add authentication/authorization middleware (for example, ['web', 'auth', 'can:manage-features']) and, in production, restrict who can access it. It manages the active store, so use the database store. Publish the views to customize them:

Requirements

Component Version
PHP 8.2+
Laravel 12.x / 13.x

Testing

Contributing

See CONTRIBUTING.md.

Security

Please review the security policy before reporting a vulnerability.

License

The MIT License (MIT). See LICENSE.


All versions of laravel-feature-flags with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^12.0 || ^13.0
illuminate/database Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.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 webrek/laravel-feature-flags contains the following files

Loading the files please wait ...