Laravel Integration for Switchover PHP SDK. Feature Toggle Management made easy.

Overview

Switchover Laravel Integration

CI codecov

Switchover

Switchover is a Software-As-A-Service for managing feature toggles (aka switches, flags or feature flips) in your application. Use it for Continous Integration, Continous Delivery, A/B-Testing, Canary Releases, Experementing and everything else you can think of.

Note: Laravel integration of the Switchover PHP SDK.

Getting Started

Install

Via composer:

composer require switchover/laravel-integration

Configuration

The SDK-Key (can be found on the switchover environment page) can be specified as env variable in your .env file:

SWITCHOVER_SDK_KEY=<YOUR SDK KEY>

If you want to change the default cache time of 60 seconds you can also modify this via env variable:

SWITCHOVER_CACHE_TIME=10 # Warning: 0 will cache forever

Basic Usage

The package exposes the Switchover facade to handle your feature toggles in the application.

Example:

class HomeController extends Controller
{

    public function index() {

        $userCtx = new Context([
            'email' => Auth::user()->email;
        ])
        
        $coolNewFeatures = Switchover::toggleValue('cool-feature', false, $userCtx);

        return //...
    }
}

Advanced Configuration

You can also publish the underlying config file to get full control over the config e.g. for the Guzzle Http client:

php artisan vendor:publish --tag="switchover-config"

Now, you should have the switchover.config in your app config folder.

Documentation

Learn more on the official documentation: Switchover Quickstart

You might also like...
Issue trackers, feature requests, and translation for all of my NamelessMC products
Issue trackers, feature requests, and translation for all of my NamelessMC products

NamelessMC Products In this repository you can find current issues for each of my NamelessMC products, progress on solving them, feature requests, and

WordPress Feature Project: Plugin Dependencies

WordPress Feature Project: Plugin Dependencies Contributors: afragen, costdev Description: Parses 'Requires Plugins' header, add plugin install depend

Tabler.io bundle for Symfony - a backend/admin theme for easy integration

Tabler Bundle for Symfony This repository contains a Symfony bundle, integrating the fantastic Tabler.io HTML Template into your Symfony project. It s

This package provides a set of factories to be used with containers using the PSR-11 standard for an easy Doctrine integration in a project

psr-container-doctrine: Doctrine Factories for PSR-11 Containers Doctrine factories for PSR-11 containers. This package provides a set of factories to

A Simple Linode SDK built for Laravel with @JustSteveKing laravel-transporter package

linode client A Simple Linode client built for Laravel with @JustSteveKing laravel-transporter package Installation You can install the package via co

Empower your business to accept payments globally, earn rewards and invest in crypto with lazerpay laravel sdk in your laravel project.
Empower your business to accept payments globally, earn rewards and invest in crypto with lazerpay laravel sdk in your laravel project.

Lazerpay Laravel Package pipedev/lazerpay is a laravel sdk package that access to laravel api Installation PHP 5.4+ and Composer are required. To get

CloudConvert PHP SDK

cloudconvert-php This is the official PHP SDK v3 for the CloudConvert API v2. For API v1, please use v2 branch of this repository. Install To install

PHP SDK For paydirectly

Paydirectly SDK for PHP PHP library for paydirectly API. Installation The recommended way to install paydirectly-php is through Composer: composer req

Community-created, unofficial PHP SDK for the Skynet Decentralized Internet Network. siasky.net

Skynet PHP SDK This SDK is a community-created, unofficial SDK in PHP for the Skynet Decentralized Internet Network. It is taken as primarily a port f

Owner
Switchover
Feature Toggle Management
Switchover
Pheature flags toggle CRUD implementation

Pheature Flags Toggle CRUD Pheature flags toggle CRUD implementation Installation Describe package installation composer require pheature/toggle-crud

Pheature Flags 5 Dec 14, 2022
Pheature flags toggle model implementation

Pheature Flags Toggle Model implementation Pheature flags toggle model implementation Installation Describe package installation composer require phea

Pheature Flags 5 Dec 12, 2022
A project of a Login screen made in PHP/CSS3/HTML5/JS with MySQL database integration

A project of a Login screen made in PHP/CSS3/HTML5/JS with MySQL database integration. And animations made with CSS3 and JavaScript itself! ??

Marcel Leite de Farias 2 Apr 26, 2022
Easy management of Virtualization technologies including KVM, Xen, OpenVZ, Virtuozzo, and LXC/LXD including unified commands, monitoring, template management, and many more features.

ProVirted About Easy management of Virtualization technologies including KVM, Xen, OpenVZ, Virtuozzo, and LXC/LXD including unified commands, monitori

null 2 Aug 22, 2022
PHP Regular expressions made easy

PHPVerbalExpressions ported from VerbalExpressions VerbalExpressions is a PHP library that helps to construct hard regular expressions. Installation T

null 2.4k Jan 3, 2023
Economy made easy for Minecraft: Bedrock

BedrockEconomy Economy made easy for Minecraft Bedrock Commands Name Description Usage Permission balance Show your and others balance balance [player

null 33 Oct 24, 2022
A PHP implementation of the Unleash protocol aka Feature Flags in GitLab.

A PHP implementation of the Unleash protocol aka Feature Flags in GitLab. This implementation conforms to the official Unleash standards and implement

Dominik Chrástecký 2 Aug 18, 2021
Build lightning-fast and feature-rich websites with ProcessWire.

WIREKIT Core Build lightning-fast and feature-rich websites with ProcessWire. Website: wirekit.dev (in plans) Demo: start.wirekit.dev/core/ Updates: W

Ivan Milincic 10 Nov 3, 2022
This package is considered feature-complete, and is now in security-only maintenance mode

laminas-soap This package is considered feature-complete, and is now in security-only maintenance mode, following a decision by the Technical Steering

Laminas Project 46 Dec 18, 2022
EmoteSimple is a Feature or API for PocketMine-MP 4.0+

EmoteSimple EmoteSimple is a Feature or API for PocketMine-MP 4.0+ Permission This feature next update.. Support You can use minecraft bedrock profile

Ibenrm 4 Nov 24, 2022