PHPackages                             networkrailbusinesssystems/orgplus - 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. networkrailbusinesssystems/orgplus

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

networkrailbusinesssystems/orgplus
==================================

Import the OrgPlus CSV

2.1.0(4w ago)01.2k↓82.5%MITPHPPHP ^8.3

Since Jul 21Pushed 4w agoCompare

[ Source](https://github.com/Network-Rail-Business-Systems/orgplus)[ Packagist](https://packagist.org/packages/networkrailbusinesssystems/orgplus)[ RSS](/packages/networkrailbusinesssystems-orgplus/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (8)Dependencies (32)Versions (11)Used By (0)

OrgPlus
=======

[](#orgplus)

[![Composer status](.github/composer.svg)](.github/composer.svg)[![Coverage status](.github/coverage.svg)](.github/coverage.svg)[![Laravel version](.github/laravel.svg)](.github/laravel.svg)[![NPM status](.github/npm.svg)](.github/npm.svg)[![PHP version](.github/php.svg)](.github/php.svg)[![Tests status](.github/tests.svg)](.github/tests.svg)

Import the OrgPlus organisational CSV into a structured series of related objects

[Upgrade guide](docs/upgrade.md)

Usage
-----

[](#usage)

Call `$orgPlus = OrgPlus::upload($file)` on the controller where you are uploading the OrgPlus CSV.

The `$file` variable can be either a `UploadedFile` or a string path.

The OrgPlus data will be processed and mapped to the relevant objects based on the fields provided.

- Cost Centre (requires `COST_CENTRE` field)
- Organisation Unit (requires `ORG` field)
- Person (requires `EMAIL_ADDRESS` field)
- Upn (requires `UPN` field)

These objects are then held in libraries on the OrgPlus object, keyed by their required field.

### Cost Centre ($orgPlus-&gt;costCentres)

[](#cost-centre-orgplus-costcentres)

All information specific to an individual Cost Centre, such as number, people, and Upns.

### Organisation Unit ($orgPlus-&gt;organisationUnits)

[](#organisation-unit-orgplus-organisationunits)

All information specific to an individual Organisation Unit, such as name and Upns.

### Person ($orgPlus-&gt;people)

[](#person-orgplus-people)

All information specific to an individual Person, such as name, e-mail, Cost Centre, and Upn.

### Upn ($orgPlus-&gt;upns)

[](#upn-orgplus-upns)

All information specific to an individual Upn, such as code, job title, grade, Organisation Unit, and people.

Bear in mind that a Upn can be shared by any number of people.

Job information is typically held on the Upn, where personal information is held on the Person.

Relationships and hierarchy
---------------------------

[](#relationships-and-hierarchy)

When the relevant fields are available, OrgPlus objects will contain references to other objects.

Both `UPN` and `PARENT_UPN` fields must be provided in the CSV to perform the parent and child hierarchy mapping.

Objects are structured as follows:

```
Cost Centre -> Organisation Unit -> Upn -> Person

```

The required fields for each model must be included to complete the hierarchy map.

### Organisation Unit

[](#organisation-unit)

Organisation Units are related to:

- Any number of parent Organisation Units
- Any number of child Organisation Units
- Any number of Cost Centres
- Any number of Upns
- Any number of people

### Cost Centre

[](#cost-centre)

Cost Centres are related to:

- Any number of parent Cost Centres
- Any number of child Cost Centres
- One Organisation Unit
- Any number of Upns
- Any number of people

### Upn

[](#upn)

- Any number of parent Upns
- Any number of child Upns
- One Cost Centre
- One Organisation Unit
- Any number of people

### Person

[](#person)

- Any number of parent people
- Any number of child people
- One Cost Centre
- One Organisation Unit
- One UPN

### Counts

[](#counts)

Per the hierarchy model, each OrgPlus object "contains" another set of models.

You can check how many OrgPlus objects are contained on a level using the `contentsCount()`, `contentsChildrenCount()` and `contentsDescendantsCount()` methods.

For example, a `Upn` contains `People`, and so would return the number of `People` that `Upn` has:

- Calling `contentsCount()` would return the number of `People` who have that `Upn`
- Calling `contentsChildrenCount()` is per `contentsCount()` plus the number of `People` the immediate children of the `Upn` has
- Calling `contentsDescendantsCount()` is per `contentsChildrenCount()`, recurring down through the hierarchy

Linked lists
------------

[](#linked-lists)

You can parse the libraries of models yourself, or you can produce a linked list of values for quick reference.

These linked lists could be stored for later use in a database, or used immediately to find relevant entries in the libraries.

### Cost Centre

[](#cost-centre-1)

- Cost Centre children
- Cost Centre hierarchy
- Cost Centre parents
- Cost Centre Organisation Units
- Cost Centre Upns
- Cost Centre People

### Organisation Unit

[](#organisation-unit-1)

- Organisation Unit children
- Organisation Unit hierarchy
- Organisation Unit parents
- Organisation Unit Cost Centre
- Organisation Unit Upns
- Organisation Unit People

### Upn

[](#upn-1)

- Upn children
- Upn hierarchy
- Upn parents
- Upn Cost Centre
- Upn Organisation Unit
- Upn People

### Person

[](#person-1)

- Person children
- Person hierarchy
- Person parents
- Person Cost Centre
- Person Organisation Unit
- Person Upn

When outputting linked lists, only the first occurrence of an object within a tree section is used to prevent infinite looping.

Adjacency lists
---------------

[](#adjacency-lists)

You can create adjacency lists for hierarchical queries and lookups using the following methods:

MethodKeyValuecostCentreAdjacency12345/12345/23456/34567organisationUnitAdjacencyAaa/Aaa/Bbb/CccpersonAdjacency///personUpnAdjacency/A123/A234/A345upnAdjacencyA123/A123/A234/A345The delimiter, `/` by default, can be customised as needed.

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance94

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.3% 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 ~51 days

Recently: every ~89 days

Total

8

Last Release

28d ago

Major Versions

1.2.1 → 2.0.02026-07-20

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17785811?v=4)[Anthony Edmonds](/maintainers/AnthonyEdmonds)[@AnthonyEdmonds](https://github.com/AnthonyEdmonds)

---

Top Contributors

[![AnthonyEdmonds](https://avatars.githubusercontent.com/u/17785811?v=4)](https://github.com/AnthonyEdmonds "AnthonyEdmonds (26 commits)")[![SimRoberts9](https://avatars.githubusercontent.com/u/124249635?v=4)](https://github.com/SimRoberts9 "SimRoberts9 (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/networkrailbusinesssystems-orgplus/health.svg)

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

###  Alternatives

[illuminate/pagination

The Illuminate Pagination package.

12234.6M1.1k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9350.2M311](/packages/illuminate-pipeline)[illuminate/cookie

The Illuminate Cookie package.

224.7M146](/packages/illuminate-cookie)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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