plin-code/laravel-full-name
plin-code/laravel-full-name is a Laravel package that adds a reusable FullName trait/accessor to models, combining first, middle, and last name fields into a normalized full name for display, search, and sorting. Configurable name parts and separators keep Eloquent models simple.
Package shape (inferred): A Laravel/Eloquent extension package providing full-name matching and sorting — FullNameMatcher, FullNameOptions — including support for sorting on a full name derived through a relationship (applySortWithRelation). It is a query-builder/scope-level utility, not a framework replacement, which is the lowest-risk category of Laravel dependency.
Architecture fit: Good. Consumption appears to be through a fluent options object plus matcher/scoper entry points, so it composes into existing Eloquent query chains rather than requiring repository rewrites or a custom query layer. FullNameOptions::withoutRelation() implies relations are opt-in, so teams can adopt name sorting on the base table first and add relation-aware sorting later. No service provider, config-publish, migration, or queue/cache surface is visible in this release, suggesting a thin footprint.
Integration feasibility: High for a standard Laravel app on Eloquent. The only external prerequisite implied is that names live in discrete columns (e.g. first/last) that the package concatenates or matches against; anything stored as a single opaque name column likely needs a mapping or is out of scope. Index strategy is the real work item — relational full-name sorting typically resolves to joins or correlated subqueries, so composite indexes on the underlying name columns are a prerequisite, not a nice-to-have.
Technical risk:
$direction parameter is documented as 'asc'|'desc', narrowed by applySort() to satisfy Laravel 13's stricter orderBy(). This tells us the package is actively tracking Laravel 13 but that the coupling to orderBy()'s signature is tight enough to break static analysis on framework upgrades. Expect a recurring (small) maintenance task each Laravel major.Key questions for the maintainer:
JOIN or a correlated subquery, and what index does it assume?'asc'|'desc' validated at the public boundary, or is it a caller contract?Stack fit: Fits a conventional Laravel monolith or modular app using Eloquent directly. It does not fit cleanly where query construction is abstracted behind a third-party search engine (Scout/Meilisearch/Elastic) or a read-model/CQRS layer, since the value proposition is SQL-level name ordering and matching. If the product already routes list endpoints through a search index, the marginal benefit is low and the integration is duplicative.
Migration path:
1.1.1 (patch release: docblock narrowing + a Rector-internal cleanup; no runtime behaviour change, no deprecations, no config or API changes).WHERE/ORDER BY shape before enabling on any high-volume endpoint.Compatibility: The release contains no breaking changes and no deprecations, so it is a safe in-place bump from 1.1.0. Its only forward-looking signal is Laravel 13 awareness — treat Laravel 13 as "supported but recently stabilised" until the maintainer publishes a version matrix. If the platform is on PHP 8.1 or below, confirm the floor before pinning.
Sequencing: Bump the patch (zero-risk, do it in the normal dependency sweep) → validate on one endpoint → add indexes → roll out relation sorting → contribute the missing semantics documentation back if gaps appear. Total engineering effort for the patch itself is minutes; the index and semantics work is the actual project, roughly 1–3 days including testing.
Maintenance: Low. A small, focused package with a narrow public surface and an active maintainer. The recurring cost is not patching — it is the PHPStan/Rector toolchain it participates in, which is a cost the team already carries if it runs Larastan.
Support: Single-maintainer open source, implied by the release-note style. Bus factor is the primary risk: no vendor SLA, and behaviour questions (collation, index assumptions) may go unanswered. Mitigation is to keep usage behind a thin internal wrapper so the package can be swapped or forked without touching call sites. This is a recommended adoption condition, not a blocker.
Scaling: Full-name sorting over relations is the scaling hotspot. Without supporting indexes, ORDER BY on a concatenated name forces filesort and degrades sharply past the low hundreds of thousands of rows, and correlated-subquery variants can degrade further. With correct composite indexes, it behaves like any indexed sort. Plan to benchmark at production row counts with realistic page depths before enabling on any main list view.
Failure modes to watch:
ORDER BY null handling — staging on a different driver than production will hide this.orderBy() if the literal contract is not enforced at the call site.Ramp-up: Low for anyone fluent in Eloquent — the API is a fluent options object and a matcher, learnable in under an hour. The genuine ramp-up is domain-side: product and QA need agreement on what "matches" and "sorts correctly" mean for names (accents, particles like "van"/"de", mononyms, non-Latin scripts) before the feature ships, because that is where user-visible defects will originate. Budget a short spec review alongside the technical integration.
Recommendation: Adopt at 1.1.1. The release itself is a no-risk patch and is evidence of healthy engineering hygiene. Approve conditional on (a) a version-matrix answer from the maintainer, (b) index validation against production-scale data, and (c) access through an internal wrapper to contain single-maintainer risk.
How can I help you explore Laravel packages today?