PHPackages                             prologue/support - 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. prologue/support

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

prologue/support
================

Prologue Support is an extension for Illuminate Support

v1.1.1(11y ago)1616.8k1MITPHPPHP &gt;=5.4.0

Since Aug 4Pushed 9y ago1 watchersCompare

[ Source](https://github.com/prologuephp/support)[ Packagist](https://packagist.org/packages/prologue/support)[ Docs](https://github.com/Prologue/Support)[ RSS](/packages/prologue-support/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Prologue Support
================

[](#prologue-support)

[![Latest Stable Version](https://camo.githubusercontent.com/a3fb2c222061162a69734fdafc5256214c3511fd781511455467d953be24d276/68747470733a2f2f706f7365722e707567782e6f72672f70726f6c6f6775652f737570706f72742f762f737461626c652e706e67)](https://packagist.org/packages/prologue/support)[![Total Downloads](https://camo.githubusercontent.com/4372515d41e8bd89b98d52f3a1a12273ce4c3bc435859e5bb2ee9c600ecebd3a/68747470733a2f2f706f7365722e707567782e6f72672f70726f6c6f6775652f737570706f72742f646f776e6c6f6164732e706e67)](https://packagist.org/packages/prologue/support)[![Build Status](https://camo.githubusercontent.com/8bc74f23035cd66f57985aa4f847e22c32c07922708b547e6f2c644ed9dfb2c9/68747470733a2f2f7472617669732d63692e6f72672f70726f6c6f6775657068702f737570706f72742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/prologuephp/support)

> This package is now abandoned. No further development or bug fixes will happen.

Prologue Support is an extension for [Illuminate Support](https://github.com/illuminate/support). It provides you with extra helper functionality for your application.

Maintained by [Cristian Tabacitu](https://github.com/tabacitu)

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
    - [Collection](#collection)
    - [MessageBag](#messagebag)
    - [Helper Functions](#helper-functions)
- [Changelog](#changelog)
- [License](#license)

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

[](#installation)

You can install Prologue Support for your project through Composer.

Require the package in your `composer.json`.

```
"prologue/support": "dev-master"

```

Run composer to install or update the package.

```
$ composer update
```

Usage
-----

[](#usage)

### Collection

[](#collection)

The `Collection.php` class in Prologue Support comes with some additional functions.

#### filterBy($key, $value)

[](#filterbykey-value)

Used to filter for records which have a specific value set for a given key.

```
$data = array(
	array('name' => 'foo', 'age' => 21),
	array('name' => 'bar', 'age' => 20),
	array('name' => 'baz', 'age' => 9),
);

$collection = new Prologue\Support\Collection($data);

// Will return only records with an age of 20.
$items = $collection->filterBy('age', 20)->all();
```

#### orderBy($key, $direction)

[](#orderbykey-direction)

Used to order records by a given key.

```
$data = array(
	array('name' => 'foo', 'age' => 21),
	array('name' => 'bar', 'age' => 20),
	array('name' => 'baz', 'age' => 9),
);

$collection = new Prologue\Support\Collection($data);

// Will order the records by its age in ascending order.
$items = $collection->orderBy('age')->all();
```

You can also order in a descending way.

```
$items = $collection->orderBy('age', 'desc')->all();
```

### MessageBag

[](#messagebag)

The MessageBag class in Prologue Support offers the ability to add arrays or other MessageBags as messages.

```
$bag = new Prologue\Support\MessageBag;
$bag->add('error', array(
	'email' => 'Incorrect email address',
	'url'   => 'Incorrect url',
));
$messages = $bag->get('error');
```

Now `$messages` equals to:

```
array(
	array(
		'email' => 'Incorrect email address',
		'url'   => 'Incorrect url',
	)
);
```

You see? One of the messages is the array we added.

The same goes for instances of `Illuminate\Support\MessageBag`.

```
$bag->add('error', new Illuminate\Support\MessageBag);
```

### Helper Functions

[](#helper-functions)

#### is\_true($value)

[](#is_truevalue)

Determine if a value is true.

```
$result = is_true(true) // true
$result = is_true(null) // false
```

#### is\_false($value)

[](#is_falsevalue)

Determine if a value is false.

```
$result = is_false(false) // true
$result = is_false(null) // false
```

#### last\_key(array $value)

[](#last_keyarray-value)

Get the last key from an array.

```
$data = array('foo' => 'bar', 'baz' => 'foz');
$result = last_key($data); // 'baz'
```

Changelog
---------

[](#changelog)

You view the changelog for this package [here](https://github.com/Prologue/Support/releases).

License
-------

[](#license)

Prologue Support is licensed under the [MIT License](https://github.com/Prologue/Support/blob/master/license.md).

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 96.7% 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

Every ~184 days

Total

4

Last Release

4110d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.3.0

v1.1.0PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f2073da18c2e24ef792dd3e9aa51d5427a79a7abfd252788e57eeb1007a89f87?d=identicon)[tabacitu](/maintainers/tabacitu)

---

Top Contributors

[![driesvints](https://avatars.githubusercontent.com/u/594614?v=4)](https://github.com/driesvints "driesvints (29 commits)")[![jtgrimes](https://avatars.githubusercontent.com/u/3291952?v=4)](https://github.com/jtgrimes "jtgrimes (1 commits)")

---

Tags

laravelhelperscollectionsupport

### Embed Badge

![Health badge](/badges/prologue-support/health.svg)

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

###  Alternatives

[pragmarx/ia-collection

Laravel Illuminate Agnostic Collection

473.4M2](/packages/pragmarx-ia-collection)

PHPackages © 2026

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