rias/statamic-position-fieldtype
A Statamic addon that adds a Position fieldtype for selecting and storing position values in the control panel. It integrates with Statamic’s fieldtype system to give editors a simple way to define positions in their content.
Architecture fit. This is a Statamic 3 Control Panel addon, not a general Laravel package. Its shape is the standard Statamic addon contract: a service provider that registers an addon manifest, a PHP Fieldtype subclass, and a Vue component that renders in the CP. It introduces no database tables, no migrations, and no queue or event surface — position is derived from existing collection/structure ordering. That makes it architecturally cheap: it sits entirely inside the content-modeling layer and does not touch application domain code, auth, or persistence. For a Statamic-based stack this is a near-zero-blast-radius component.
Integration feasibility. Mechanically trivial — composer require rias/statamic-position-fieldtype, then add the handle to a blueprint. The work is not integration; it is resuscitation. The package was last released 2020-08-20, targeting Statamic 3.x and the Vue 2 CP. Statamic 4 and 5 moved the CP to Vue 3/Inertia and bumped the Laravel baseline to 10/11, so the Composer constraint will block install and the CP asset will not register even if forced. Feasibility for a modern stack is therefore "vendor and port," not "install."
Technical risk. High, concentrated in three places:
Fieldtype base class has been comparatively stable across Statamic 3→5, so the port is front-end-dominant — days, not weeks, but not zero.Key questions for the spike.
Stack fit. Clean fit for a Laravel + Statamic application, with the caveat that "fit" depends on which Statamic major you are on. On Statamic 3 (Laravel 8/9) it installs as-is and is low-risk. On Statamic 4/5 (Laravel 10/11) it requires a port and should be treated as an internal component, not a dependency.
Migration path. Two viable routes:
addons/ directory under your own namespace. Update the statamic/cms constraint, port the Vue 2 component to the Vue 3/Inertia CP conventions, add a smoke test that asserts the fieldtype registers and its options resolve. Effort: roughly 2–5 dev-days for someone fluent in the Statamic CP; the PHP surface is small.orderBy in the query layer. Loses the "insert at position N" affordance but eliminates the fork obligation.Do not take a hard dependency on the abandoned upstream via composer require and hope. That guarantees a broken build at the next Statamic upgrade with no upstream fix path.
Compatibility. Verify PHP 8.1+ against the fieldtype's type hints, and audit any use of Statamic:: facade methods or CP asset registration APIs that changed between 3.x and 5.x. The front-end component is where the real breakage lives.
Sequencing.
Maintenance. You become the maintainer on day one. The surface is small — a PHP class and a Vue component — but it is a CP component, so it inherits every Statamic major upgrade as a maintenance event. Budget a recurring line item, not a one-off.
Support. None upstream. No issue triage, no security advisories, no CVE feed. Internal ownership, internal runbook, and a documented "this is a fork" note in the repo are the mitigation. Given zero dependents, there is also no community to consult when it breaks.
Scaling. Risk scales with sibling count. If the option list enumerates all siblings on every CP render, collections in the low thousands will produce slow editor pages and heavy query volume; above a few hundred siblings it likely needs pagination or a search-backed picker. Runtime cost on the delivery side is nil if position is stored as a plain integer and sorted in the query — that path is cheap and cacheable.
Failure modes.
orderBy('position') with a stable tiebreaker on id/date).Ramp-up. Low. A mid-level developer familiar with Laravel and either Vue 2 or 3 can read the entire source in an afternoon. The real cost is context, not complexity: someone must own the fork, know it is a fork, and remember to re-validate it at each Statamic major.
Recommendation. Treat this as a reference implementation, not a dependency. The opportunity score says the capability is worth having; the maturity signals (1 star, 0 dependents, 5 years stale) say do not inherit the maintenance. Fork it, port the CP component, keep the PHP surface if it survives the spike, and be prepared to fall back to a custom integer-plus-sort field if the port cost exceeds roughly a week.
How can I help you explore Laravel packages today?