PHPackages                             genericmilk/rollout - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. genericmilk/rollout

ActiveLibrary[HTTP &amp; Networking](/categories/http)

genericmilk/rollout
===================

Time delay your laravel controller and blade code into a simple if branch!

1.0(6y ago)16MITPHPPHP &gt;=7.2

Since Dec 12Pushed 6y ago1 watchersCompare

[ Source](https://github.com/genericmilk/rollout)[ Packagist](https://packagist.org/packages/genericmilk/rollout)[ RSS](/packages/genericmilk-rollout/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

🤖 Rollout
=========

[](#-rollout)

By Genericmilk
--------------

[](#by-genericmilk)

Rollout allows you to simplify A/B testing by specifying a date of when your code should be fully live in a simple controller if statement! It allows big changes to be rolled out slowly using IP addresses so you can respond quicker to issues before it hits everyones screens!

### Install Rollout

[](#install-rollout)

To get started using Rollout you need to add it to your composer.json file. You can do this by running the following command

```
composer require genericmilk/rollout

```

This'll install the prerequisites to get Rollout working.

### Using Rollout

[](#using-rollout)

To get started using Rollout in your controller, You need to import it. Add this to the top of your controller to get started;

```
use Genericmilk\Rollout\Rollout;

```

Now that you've added Rollout to your controller, you can use it to in your functions!

### Creating a rollout

[](#creating-a-rollout)

Rollouts simply return booleans which allow them to be used in if statements very easily. To create one, simply use the following code:

```
if(Rollout::from('2019-12-12 00:00:00')->until('2019-12-13 20:00:00')->go()){
    return 'Rolling out is pretty fun';
}

```

Rollout will use the `from` parameter and work out how close we are to the `until` parameter. It'll then use that percentage to progress through IP addresses (Starting at 0.0.0.0 all the way up to 255.255.255). If your ip address falls below the current rollout percentage the boolean will return a `false` which will make the code you specify not fire. However if you are within the threshold, the boolean will naturally return a `true` which means you get to run the code specified!

You can do this in a full if/else statement too by extending as such

```
if(Rollout::from('2019-12-12 00:00:00')->until('2019-12-13 20:00:00')->go()){
    return 'Rolling out is pretty fun';
}else{
    return 'Pity you cannot see it until you meet the threshold ;)';
}

```

In the above example the controller will return the appropriate string depending on your current rollout.

### Showing a percentage of a rollout

[](#showing-a-percentage-of-a-rollout)

If you need to see where a rollout is in its lifespan you can instead of using the `->go()` command substitute for `->status();`. This will instead of returning a boolean return a `int` with the curent percentage of the rollout. You can use that like so;

```
$Status = Rollout::from('2019-12-12 00:00:00')->until('2019-12-13 20:00:00')->status();
return 'The rollout is currently at '.$Status.'%';

```

### Roadmap

[](#roadmap)

I really hope you love using Rollout! Let me know your thoughts! I have some improvements down the line too and am open to bug fixes etc. Hope this is useful to you!

Love you guys 🥰

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2348d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cff61292b60883c06681d13acfaf0942d1cdbb9313a1a111a9f61f9618d9f60?d=identicon)[genericmilk](/maintainers/genericmilk)

---

Top Contributors

[![genericmilk](https://avatars.githubusercontent.com/u/1846127?v=4)](https://github.com/genericmilk "genericmilk (9 commits)")

---

Tags

apilaravelcurlgetpost

### Embed Badge

![Health badge](/badges/genericmilk-rollout/health.svg)

```
[![Health](https://phpackages.com/badges/genericmilk-rollout/health.svg)](https://phpackages.com/packages/genericmilk-rollout)
```

###  Alternatives

[vinelab/http

An http library developed for the laravel framework. aliases itself as HttpClient

59300.2k11](/packages/vinelab-http)[phpgt/fetch

Asynchronous HTTP client with promises.

3724.0k3](/packages/phpgt-fetch)[elementaryframework/water-pipe

URL routing framework and requests/responses handler for PHP

254.6k4](/packages/elementaryframework-water-pipe)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
