PHPackages                             exolnet/laravel-bento - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. exolnet/laravel-bento

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

exolnet/laravel-bento
=====================

Laravel module to launch features at people.

v2.7.0(3mo ago)721.5k1MITPHPPHP ^8.2CI passing

Since Aug 1Pushed 3mo ago4 watchersCompare

[ Source](https://github.com/eXolnet/laravel-bento)[ Packagist](https://packagist.org/packages/exolnet/laravel-bento)[ Docs](https://github.com/eXolnet/laravel-bento)[ RSS](/packages/exolnet-laravel-bento/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (21)Used By (0)

Laravel Bento
=============

[](#laravel-bento)

[![Latest Stable Version](https://camo.githubusercontent.com/d3d32ac1e306f4c3cdc4bffdbc16d85f65e1f7f3401f623abe70430fccc121fa/68747470733a2f2f706f7365722e707567782e6f72672f65586f6c6e65742f6c61726176656c2d62656e746f2f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/eXolnet/laravel-bento)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/5fe49f1ee1d869d1d721dfc6b7300a10b02532748870133c33c83fd5938c7fae/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f65586f6c6e65742f6c61726176656c2d62656e746f2f74657374732e796d6c3f6c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/eXolnet/laravel-bento/actions?query=workflow%3Atests)[![Total Downloads](https://camo.githubusercontent.com/c69e175852000cc70b1a2b7585ff2806f3d57d5008e72c86094235669ef6e583/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f65586f6c6e65742f6c61726176656c2d62656e746f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/eXolnet/laravel-bento)

Bento helps you organize feature launches by custom user segments. Create and organize rules to make features available to certain users.

Define your features, define your segmentation strategies and let Bento launch each feature to the right people. Bento can also help you run A/B testing on your applications.

The core concepts of this library are inspired by [Airbnb's Trebuchet](https://github.com/airbnb/trebuchet) project for Ruby.

Installation
------------

[](#installation)

Require this package with composer:

```
composer require eXolnet/laravel-bento
```

After installing Bento, publish its example service provider to hold your feature definitions:

```
php artisan vendor:publish --tag=bento-provider
```

Then, add it to the `providers` array in `config/app.php`:

```
App\Providers\BentoServiceProvider::class
```

Usage
-----

[](#usage)

### Create Features

[](#create-features)

Define features and their launch segmentation strategies. You can define one strategy with the `feature` method:

```
Bento::feature('feature')->visitorPercent(10);
```

Or you can combine multiple strategies:

```
Bento::feature('feature')->visitorPercent(10)->hostname('example.com');
```

Your features could be grouped in the `boot` method of a service provider:

```
