LaravelPackages.net
Acme Inc.
Toggle sidebar
mwkcoding/laravel-feature-flags

A simple Laravel package to get feature flags in your project.

83
0
0.1.1
About mwkcoding/laravel-feature-flags

mwkcoding/laravel-feature-flags is a Laravel package for a simple laravel package to get feature flags in your project.. It currently has 0 GitHub stars and 83 downloads on Packagist (latest version 0.1.1). Install it with composer require mwkcoding/laravel-feature-flags. Discover more Laravel packages by mwkcoding or browse all Laravel packages to compare alternatives.

Last updated

Laravel Feature Flags 🚀

GitHub Actions GitHub commits since latest release (by SemVer) Latest Version on Packagist Total Downloads Packagist PHP Version Support codecov

A Feature flag is at times referred to as a feature toggle or feature switch. Ultimately it's a coding strategy to be used along with source control to make it easier to continuously integrate and deploy. The idea of the flags works by essentially safe guarding sections of code from executing if a feature flag isn't in a switched on state.

This package aims to make implementing such flags across your application a great deal easier by providing solutions that work with not only your code but your routes, blade files, task scheduling and validations.

Installation

You can install the package via composer:

composer require mwkcoding/feature-flags

Publish the config:

php artisan vendor:publish --provider="Mwk\FeatureFlags\FeatureFlagsServiceProvider" --tag="config"

Usage

In your controllers, jobs, etc.

// Check if a feature is enabled in your backend logic
use Mwk\FeatureFlags\FeatureManagerFacade;

if (FeatureManagerFacade::feature('my-feature')->enabled()) {
    // Your feature specific logic
}

Blade views

@feature('my-feature')
    <p>Feature turned on</p>
@endfeature

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.

Star History Chart