Download the PHP package maxiewright/ttdf-orbat without Composer
On this page you can find all versions of the php package maxiewright/ttdf-orbat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download maxiewright/ttdf-orbat
More information about maxiewright/ttdf-orbat
Files in maxiewright/ttdf-orbat
Package ttdf-orbat
Short Description ORBAT reference data for the Trinidad and Tobago Defence Force
License MIT
Homepage https://github.com/maxiewright/ttdf-orbat
Informations about the package ttdf-orbat
ORBAT Reference Data for the Trinidad and Tobago Defence Force
[]()
[
]()
[
]()
[
]()
A Laravel package providing structured ORBAT (Order of Battle) reference data for the Trinidad and Tobago Defence Force. Covers formations, ranks (all three services), unit trees, vessel details, base locations, attachment tracking, and establishment appointments.
Installation
Publish and run migrations:
Seed the reference data:
Publishing Assets
Facade API
The TtdfOrbat facade provides cached, convenient access to all ORBAT data:
Cache TTL is configurable in config/ttdf-orbat.php. Set cache_ttl to 0 to disable.
Models
| Model | Purpose |
|---|---|
Formation |
Service branches (TTR, TTCG, TTAG, TTDFR) |
RankGrade |
Cross-service rank equivalence grades (17 grades) |
Rank |
Formation-specific rank titles and abbreviations |
Unit |
Hierarchical unit tree with adjacency list support |
UnitDetail |
Vessel specs, base locations, coordinates (polymorphic) |
UnitAttachment |
Temporary attachment/detachment tracking with history |
Appointment |
Establishment posts within a unit (the slot, not the holder) |
Unit Tree Traversal
Units use the staudenmeir/laravel-adjacency-list package for recursive queries:
Appointments
An appointment is a named establishment post within a unit — the slot, not the person filling it. Appointments are defined by NodeType, and running (or re-running) the seeder applies these templates to all units, including any new units you have added.
TTR Formation Appointments
| # | Title | Abbr | Category | Type | Rank Range |
|---|---|---|---|---|---|
| 0 | Commanding Officer | CO | Commissioned | Command | OF-7 – OF-8 |
| 1 | Deputy Commanding Officer | DCO | Commissioned | Command | OF-6 – OF-7 |
| 2 | Senior Staff Officer | SSO | Commissioned | Staff | OF-5 – OF-6 |
| 3 | Personnel Officer | G1 | Commissioned | Staff | OF-4 – OF-5 |
| 4 | Legal Officer | LO | Commissioned | Staff | OF-3 – OF-4 |
| 5 | Human Resource Officer | HRO | Commissioned | Staff | OF-3 – OF-4 |
| 6 | Education Officer | EO | Commissioned | Staff | OF-3 – OF-4 |
| 7 | Intelligence Officer | G2 | Commissioned | Staff | OF-4 – OF-5 |
| 8 | Operations Officer | G3 | Commissioned | Staff | OF-4 – OF-5 |
| 9 | Logistics Officer | G4 | Commissioned | Staff | OF-4 – OF-5 |
| 10 | Projects Officer | G5 | Commissioned | Staff | OF-4 – OF-5 |
| 11 | ICT Officer | G6 | Commissioned | Staff | OF-4 – OF-5 |
| 12 | Regiment Signals Officer | RSO | Commissioned | Staff | OF-4 – OF-5 |
| 13 | Public Relations Officer | G8 | Commissioned | Staff | OF-4 – OF-5 |
| 14 | Welfare Officer | G9 | Commissioned | Staff | OF-4 – OF-5 |
| 15 | Regimental Command Warrant Officer | RCWO | Warrant Officer | Administrative | WO-2 |
Enums
| Enum | Values |
|---|---|
FormationType |
regiment, coast_guard, air_guard, reserve, joint |
NodeType |
force, formation, headquarters, battalion, company, platoon, section, vessel, squadron, flight, station, wing, flotilla, detachment, base, installation, directorate, department, branch, unit |
RankCategory |
OF (commissioned), WO (warrant), OR (other ranks) |
AppointmentType |
command, staff, technical, administrative, medical, chaplain, legal |
AppointmentCategory |
commissioned, warrant_officer, other_ranks, civilian |
ServiceBranch |
army, navy, air, joint |
UnitStatus |
active, reserve, decommissioned, disbanded |
VesselType |
opv, cpv, fpc, fcs, interceptor |
Rank Structure
Ranks are sourced from the Wikipedia TTDF military ranks reference. The package uses 17 abstract rank grades with formation-specific titles:
| Grade | TTR (Army) | TTCG (Coast Guard) | TTAG (Air Guard) |
|---|---|---|---|
| OF-8 | Major General | Rear Admiral | Air Vice Marshal |
| OF-7 | Brigadier General | Commodore | Air Commodore |
| OF-6 | Colonel | Captain | Group Captain |
| OF-5 | Lieutenant Colonel | Commander | Wing Commander |
| OF-4 | Major | Lieutenant Commander | Squadron Leader |
| OF-3 | Captain | Lieutenant | Flight Lieutenant |
| OF-2 | Lieutenant | Sub-Lieutenant | Flying Officer |
| OF-1 | Second Lieutenant | Acting Sub-Lieutenant | Pilot Officer |
| OF-D | Officer Cadet | Midshipman | Officer Cadet |
| OF-D1 | -- | Officer Cadet | -- |
| OR-5 | Staff Sergeant | Chief Petty Officer | Sergeant |
| OR-4 | Sergeant | Petty Officer | Corporal |
| OR-3 | Corporal | Leading Seaman | Senior Technician |
| OR-2 | Lance Corporal | Able Seaman | Senior Aircraftman |
| OR-1 | Private | Ordinary Seaman | Junior Aircraftman |
| WO-2 | Warrant Officer Class 1 | Fleet Chief Petty Officer | Warrant Officer Class 1 |
| WO-1 | Warrant Officer Class 2 | -- | Warrant Officer Class 2 |
Each formation has 16 ranks (skipping one grade that doesn't apply to their service).
TTR Unit Tree
The Regiment unit seeder provides:
Artisan Commands
Model Factories
Factories are available for all models. Use them directly or publish to your application:
Factory States Reference
| Factory | States |
|---|---|
FormationFactory |
regiment(), coastGuard(), airGuard(), inactive() |
RankGradeFactory |
officer(), warrant(), otherRanks() |
RankFactory |
(auto-creates grade and formation) |
UnitFactory |
childOf($parent), battalion(), company(), platoon(), headquarters(), vessel(), detachment(), decommissioned(), disbanded() |
UnitDetailFactory |
forVessel($unit), forBase($unit) |
UnitAttachmentFactory |
ended(), withAuthority($string) |
AppointmentFactory |
command(), inactive() |
Testing & Static Analysis
Requirements
- PHP ^8.4
- Laravel 11 or 12
Upgrading
When updating the package to a new version that includes seeder changes (new appointments, updated unit data, etc.), re-run the seeder to pull in the latest reference data:
Roadmap
- TTCG unit seeder (vessels, stations, Coast Guard HQ)
- TTAG unit seeder (flights, squadrons, Air Guard HQ)
- TTCG/TTAG appointment seeders
- TTDFR unit and rank seeders
- Filament admin panel integration
License
MIT
All versions of ttdf-orbat with dependencies
illuminate/contracts Version ^11.0||^12.0||^13.0
spatie/laravel-package-tools Version ^1.16
staudenmeir/laravel-adjacency-list Version ^1.25