Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Xetaravel Mentions

Xetaravel Mentions Laravel Package

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.

View on GitHub
Deep Wiki
Context7

A @laravel package to parse @mentions from a text and mention the users.

Frequently asked questions about Xetaravel Mentions
How do I install and configure xetaio/xetaravel-mentions in a Laravel app?
Install it with composer require xetaio/xetaravel-mentions, then publish the config and migration using the package vendor:publish tags and run php artisan migrate. Add the author-side trait to models that contain text and the Mentionable trait to user-like models. The published config controls mention syntax and related behavior.
Which Laravel and PHP versions does xetaravel-mentions support?
Version 12.0.0 was released as a Laravel 12 compatibility update. The release notes do not clearly state whether Laravel 11 support was dropped, so inspect the illuminate/support constraint in composer.json before upgrading an 11.x app. The evaluation also did not confirm exact PHP version requirements or the CI matrix, so verify those before adoption.
How do I parse @mentions from text in Laravel with this package?
Add the author-side trait to a content model and invoke the package parse or sync step in the create and update path, or in a queued job. The parser detects @handle patterns and maps them to mentionable user records. You can then render the stored mentions through the Blade helper.
How do I send notifications to mentioned users with xetaravel-mentions?
Wire Laravel notifications by using the package mentionable notification contract on user-like models and triggering notifications when mentions are synced. The package optionally notifies mentioned users; whether edits re-notify is a product policy you must define. Test with Notification::fake to confirm recipients.
What models need the mention traits and how do I set them up?
Add the author trait to models such as Post, Comment, or Ticket, and the Mentionable trait to your User model or any model that can be mentioned. The mentioned model needs a unique handle column that matches the mention syntax. No service provider configuration beyond package discovery is typically required.
What database migration and table does the package add?
The package ships one migration for a polymorphic mentions table, which stores the link between mentioning content and mentioned models. Publish and run the migration during installation. The schema is simple and works on MySQL, Postgres, and SQLite.
How do I render @mentions as links in Blade views?
Use the package Blade helper to convert stored @handle values into links in server-rendered views. Because handles can come from user input, confirm the helper escapes output safely; if you build custom rendering, escape handles and validate URLs. In an SPA or Inertia app, parse server-side and render links client-side.
How can I test mention parsing and notifications in my Laravel app?
Testing is not heavily documented, so write feature tests around your create and update paths and assert parsed mentions and notification recipients. Use Laravel Notification::fake for notification assertions and fixture text for parser edge cases such as emails, URLs, and code blocks. Treat parsing correctness as your own test responsibility.
How does the parser handle emails, URLs, code blocks, and invalid handles?
The parser is regex-based, so production testing should cover email addresses like [email protected], URL and handle collisions, mentions inside code fences or quotes, unicode and emoji-adjacent handles, and long display names versus usernames. These are product-visible defects rather than crashes, so define a valid mention policy and sanitize rendered handles for XSS. In API-only or SPA apps, parse on the server and render links on the client.
Is xetaravel-mentions maintained, and what are the risks or alternatives?
It is effectively a single-maintainer package with a small community and no clearly documented security policy, so assess bus factor before production use. The code surface is small enough to vendor or fork if needed. Because major versions track Laravel majors, plan an annual compatibility review; alternatives include a small custom parser or another Laravel mention package if you need broader support.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk