xetaio/xetaravel-mentions
A Laravel package for parsing and rendering @mentions in text, converting them into links and optionally notifying mentioned users. Includes a user trait, configurable mention syntax, events, and Blade helpers for easy integration.
Architecture fit
Xetaravel-Mentions is a small, single-purpose Laravel package: two model traits (an author-side trait for parsing mentions, a target-side Mentionable trait), a published config file, one migration for a polymorphic mentions table, a parser class, and a Blade helper for rendering @handle as links. It fits cleanly into a standard Laravel app as a domain utility for comments, posts, tickets, and activity feeds — there is no service provider surface to manage beyond package discovery and no coupling to queues, routing, or auth. It is a "feature building block," not infrastructure.
The 12.0.0 release is a single-line change (Laravel 12 compatibility, PR #35). The major version bump is the meaningful signal, not the code change: the package tracks Laravel's annual major cadence, so a major release here is primarily a compatibility boundary declaration, not a feature or behavior release. Treat the version number as "supports Laravel 12," and verify whether it also still supports 11.
Integration feasibility High. The expected effort for a greenfield adoption is on the order of one to three engineering days:
composer require xetaio/xetaravel-mentionsThe main non-trivial work is product policy, not code: what counts as a valid mention, whether mentions trigger notifications, whether edits re-notify, and how to render untrusted handles safely.
Technical risk
[email protected]), URL/handle collisions, mentions inside code fences or quoted text, unicode/emoji-adjacent handles, and long display names vs. usernames. These are product-visible defects, not crashes, but they erode trust.illuminate/* constraint widened or narrowed, or whether the migration changed. That is the single largest unknown for a 11.x shop.Key questions
illuminate/support constraint now ^12.0 only? This determines whether the upgrade is optional or forced.Stack fit Fits any conventional Laravel app with Eloquent models and a relational database (MySQL/Postgres; SQLite is fine for the package's simple schema). It expects a users-like table with a unique handle column. No hard dependency on a front end, though the Blade helper assumes server-rendered views; in an SPA/Inertia app you would use the parser server-side and render links client-side. It coexists fine with a notifications stack and with queue workers.
Migration path (11.x → 12.0.0) Because there is no prior assessment and no confirmed feature delta, run this as a low-risk, reversible upgrade:
composer.json constraints — specifically whether 12.0.0 excludes Laravel 11. If it does, this upgrade is gated on the app's own Laravel 12 migration, and 11.x becomes a pinned, unsupported-by-latest version you must consciously accept for a period.config/mentions.php against your published copy. Config keys silently not merged on vendor:publish are a classic source of "it stopped working."Compatibility Primary constraint is the app's Laravel and PHP versions. Secondary compatibility: the notification trait versus your existing notification classes; the mentionable morph map versus any existing polymorphic conventions; database collation for handle matching (case sensitivity is a real product decision).
Sequencing
Maintenance Ongoing cost is low in absolute terms but recurring by design: expect one mandatory version decision per Laravel major. Budget roughly a day per year for the bump plus regression testing. Because the package is small and stable, most years the correct action will be "bump constraint, run tests, ship" — but that is only true if the app has tests that actually cover mention parsing.
Support Support risk concentrates in one person. There is no vendor SLA, no LTS commitment, and no guarantee of a release aligned to a given Laravel patch. For a product feature of meaningful user visibility (notifications!), that argues for either (a) an internal fork with a named owner, or (b) a thin internal abstraction layer over the parser so the package can be swapped without touching call sites. Option (b) is cheap and is the recommended posture.
Scaling
(mentionable_type, mentionable_id) and (mentioned_id, created_at) and plan a retention policy.Failure modes
Ramp-up Low. A mid-level Laravel developer can be productive in under a day; the entire integration surface is two traits, one config file, and one migration. The learning cost is not in the package API but in the parsing edge cases and notification policy, which are product decisions that should be written down (valid handle charset, edit semantics, dedupe window, notification opt-out) before the feature ships rather than discovered in support tickets.
How can I help you explore Laravel packages today?