Download the PHP package mohamedhekal/laravel-featurebox without Composer

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

Laravel FeatureBox

Latest Version on Packagist Tests Code Style Total Downloads License

A simple, flexible feature toggle system for Laravel โ€” control the visibility of features across environments, users, and conditions.


๐Ÿ“‹ Table of Contents


๐Ÿš€ Introduction

Laravel FeatureBox is a lightweight Laravel package that helps you manage feature flags in your application.

Whether you're rolling out features gradually, testing beta features for specific users, or disabling features in production โ€” FeatureBox gives you full control.

Inspired by tools like LaunchDarkly, but made for Laravel.


โœจ Features


๐Ÿ“‹ Requirements

๐Ÿš€ Quick Start

๐Ÿ“ฆ Installation

Install via Composer:

Then publish the config and migration files:


โš™๏ธ Usage

Enable or disable features from the database or using Artisan commands.

Basic Usage

With Context

You can pass context to evaluate conditions:

In Blade Templates

In Controllers


๐Ÿ“š API Reference

Core Methods

FeatureBox::isEnabled(string $feature, array $context = []): bool

Check if a feature is enabled for the given context.

FeatureBox::isDisabled(string $feature, array $context = []): bool

Check if a feature is disabled (opposite of isEnabled).

FeatureBox::enable(string $feature, array $conditions = []): bool

Enable a feature with optional conditions.

FeatureBox::disable(string $feature): bool

Disable a feature.

FeatureBox::get(string $feature): ?array

Get detailed information about a feature.

FeatureBox::all(): array

Get all features with their status.


๐Ÿง  Feature Conditions

Each feature can include optional conditions like:

Example Conditions

Conditions will be evaluated dynamically before enabling any feature.


๐Ÿงช Artisan Commands

Enable a Feature

Disable a Feature

List All Features


๐Ÿ”ง Configuration

The package configuration is located at config/featurebox.php:

Environment Variables


๐Ÿ“Š Database Schema

The package creates a features table with the following structure:


๐Ÿ” Security

All logic is scoped locally; no external API calls or tracking. You can optionally cache the features for performance using Laravel's cache system.


๐Ÿงช Testing

Example Test


โœ… Roadmap


๐Ÿ†˜ Support

๐Ÿง‘โ€๐Ÿ’ป Developed by Mohamed Hekal

Feel free to submit issues, ideas, or pull requests.

๐Ÿค Contributing

Please see CONTRIBUTING.md for details.

๐Ÿ“„ License

This package is open-sourced under the MIT license.


๐Ÿ“š Examples

E-commerce Example

Beta Testing Example

Environment-Specific Features

Gradual Rollout


All versions of laravel-featurebox with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
laravel/framework Version ^10.0|^11.0
illuminate/support Version ^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 mohamedhekal/laravel-featurebox contains the following files

Loading the files please wait ....