lookitsatravis/listify
Listify is a Laravel package for adding list functionality to your application. It provides an Eloquent-friendly way to create and manage lists and their items, making it easy to build features like favorites, collections, or simple to-do lists.
position column on an Eloquent model plus relative-move operations (up/down/top/bottom) and a scoped ordered read. This package is a working articulation of that primitive, which is useful for sizing: it is roughly a one-day build, not a multi-sprint epic.position-with-resequencing approach this package implies is simple and readable but writes multiple sibling rows per reorder and needs care under concurrent edits. If a shared list is reordered by many users, or lists run into the thousands, you want fractional/lexicographic ranking or a gap-based scheme instead. Deciding this before launch avoids a painful migration after data exists.Consider it as source material only — read the trait, lift the approach, write your own — when:
composer.json: the zero-star / zero-dependent / zero-score profile strongly suggests it predates current Laravel releases, and older packages commonly break on lists() → pluck() renames, PHP 8 deprecations, and return-type changes.Look elsewhere — and by default assume you should — when:
spatie/eloquent-sortable is the de facto standard in this space and is the sane default; compare against it before writing anything.(parent_id, position), audit history of reorder events, or sparse positions that survive bulk imports and rapid drag-and-drop. All of those go beyond what a simple position trait provides.To executives: Ordering features — prioritize, pin, reorder, curate, "featured" rails — look like separate roadmap asks, but they are one small capability. We can deliver them cheaply by standardizing on a single ordering pattern across the product. This specific package is a useful blueprint but is unmaintained and has effectively zero adoption, so we should not take it as a dependency. We will implement the pattern in-house (roughly a day) or use the maintained community standard. Net: the feature is cheap; the dependency would be the expensive part — it buys us a permanent maintenance and security-review tax in exchange for code we could own outright.
To engineering: Listify is a reference implementation for an ordered-list trait on Eloquent models — a position column, relative moves, scoped ordering, and a small list-rendering API. Do not add it to composer.json: no stars, no dependents, no score, and framework support is likely stale. Sequence the work as: (1) timebox a half-day spike to confirm the constraint set resolves against our Laravel version and to read the trait source; (2) default to a ~150-line in-house trait with scopeOrdered, moveBefore/moveAfter, and a transactional reindex, or fork-and-vendor under a private repo; (3) evaluate spatie/eloquent-sortable first as the maintained alternative. Whichever path we take, add the two things a naive position trait does not give us — a uniqueness constraint on (scope, position) and a documented concurrency story for shared lists — plus a deterministic backfill migration for existing rows, integration tests for reorder concurrency and reindex idempotency before the UI ships, and a note on fork provenance so a future engineer isn't left asking why the dependency exists.
How can I help you explore Laravel packages today?