PHPackages                             sgtaziz/laravel-mentions - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sgtaziz/laravel-mentions

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sgtaziz/laravel-mentions
========================

Laravel 5 package that provides facebook-like mention functionality

1.1.1(10y ago)06MITPHPPHP &gt;=5.5.9

Since Sep 19Pushed 3y agoCompare

[ Source](https://github.com/sgtaziz/laravel-mentions)[ Packagist](https://packagist.org/packages/sgtaziz/laravel-mentions)[ Docs](https://github.com/unicodeveloper/laravel-mentions)[ RSS](/packages/sgtaziz-laravel-mentions/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (5)Used By (0)

laravel-mentions
================

[](#laravel-mentions)

[![Latest Stable Version](https://camo.githubusercontent.com/2225e947f3951bf0ac84c3d550bd6910c63d591da21998cd54018642c7a8a45f/68747470733a2f2f706f7365722e707567782e6f72672f756e69636f646576656c6f7065722f6c61726176656c2d6d656e74696f6e732f762f737461626c652e737667)](https://packagist.org/packages/unicodeveloper/laravel-mentions)[![](https://camo.githubusercontent.com/984f6792e3d81e34b782c12770dfd5e6153ea75f5e71d8e668933b988ba1a81f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f756e69636f646576656c6f7065722d617070726f7665642d627269676874677265656e2e737667)](https://camo.githubusercontent.com/984f6792e3d81e34b782c12770dfd5e6153ea75f5e71d8e668933b988ba1a81f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f756e69636f646576656c6f7065722d617070726f7665642d627269676874677265656e2e737667)[![License](https://camo.githubusercontent.com/275f7019f23d1e2165b2d0418ae6d8b08f1097f991754e3b254f466855911c10/68747470733a2f2f706f7365722e707567782e6f72672f756e69636f646576656c6f7065722f6c61726176656c2d6d656e74696f6e732f6c6963656e73652e737667)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/b463a4ad648ec4004dd40ea6b64e37653e8520c92ac17aa4c5aadab84e42390b/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f756e69636f646576656c6f7065722f6c61726176656c2d6d656e74696f6e732e737667)](https://travis-ci.org/unicodeveloper/laravel-mentions)[![Quality Score](https://camo.githubusercontent.com/2b4bd3a75234131909d7edb36bff669c9c9c56a435de6f9b233fb60615638e03/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f756e69636f646576656c6f7065722f6c61726176656c2d6d656e74696f6e732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/unicodeveloper/laravel-mentions)[![Total Downloads](https://camo.githubusercontent.com/1d88b5fc3f75b60cb7504fb6b541bdcd1b9a997d849488a4356521e4a26a206a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f756e69636f646576656c6f7065722f6c61726176656c2d6d656e74696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/unicodeveloper/laravel-mentions)

This package makes it possible to create text/textarea fields that enable **mentioning** by using [At.js](https://github.com/ichord/At.js).

The data for the autocomplete is loaded from a route which will load data based on predefined key-value pairs of an alias and a model in the config.

Installation
------------

[](#installation)

First, pull in the package through Composer.

```
"require": {
    "unicodeveloper/laravel-mentions": "1.1.*"
}
```

And then include these service providers within `config/app.php`.

```
'providers' => [
    Unicodeveloper\Mention\MentionServiceProvider::class,
    Collective\Html\HtmlServiceProvider::class,
];
```

If you need to modify the configuration or the views, you can run:

```
php artisan vendor:publish
```

The package views will now be located in the `app/resources/views/vendor/mentions/` directory and the configuration will be located at `config/mentions.php`.

Configuration
-------------

[](#configuration)

To make it possible for At.js to load data we need to define key-value pairs that consist of an alias and a corresponding model.

```
return [

    'users'    => 'App\User',      // responds to /api/mentions/users
    'friends'  => 'App\Friend',    // responds to /api/mentions/friends
    'clients'  => 'App\Client',    // responds to /api/mentions/clients
    'supports' => 'App\Supporter', // responds to /api/mentions/supports

];
```

So now with these `aliases` configured we could create a new textfield which will send a request to the `users` route and search for matching data in the `name` column.

```
{!! mention()->asText('recipient', old('recipient'), 'users', 'name') !!}
```

You can also add a class name for styling of the text and textareas, that's the last argument. In this example, it is `user-form`

```
{!! mention()->asText('recipient', old('recipient'), 'users', 'name', 'user-form') !!}
```

Example
-------

[](#example)

```

        Laravel PHP Framework

        @include('mentions::assets')

            {!! mention()->asText('recipient', old('recipient'), 'users', 'name') !!}
            {!! mention()->asTextArea('message', old('message'), 'users', 'name') !!}

```

Install
-------

[](#install)

Via Composer

```
$ composer require unicodeveloper/laravel-mentions
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

How can I thank you?
--------------------

[](#how-can-i-thank-you)

Why not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter or HackerNews? Spread the word!

Don't forget to [follow me on twitter](https://twitter.com/unicodeveloper)!

Thanks! Prosper Otemuyiwa.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 73.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~53 days

Total

4

Last Release

3729d ago

Major Versions

0.1-alpha → 1.0.02015-09-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/fde534d6e24e337d9797ca6ea5845ae19db8696df90a30560a1f90e20375eb45?d=identicon)[sgtaziz](/maintainers/sgtaziz)

---

Top Contributors

[![unicodeveloper](https://avatars.githubusercontent.com/u/2946769?v=4)](https://github.com/unicodeveloper "unicodeveloper (17 commits)")[![TsvetomirCh](https://avatars.githubusercontent.com/u/8522678?v=4)](https://github.com/TsvetomirCh "TsvetomirCh (4 commits)")[![sgtaziz](https://avatars.githubusercontent.com/u/5303104?v=4)](https://github.com/sgtaziz "sgtaziz (2 commits)")

---

Tags

laravelautocompletelaravel 5smart searchlaravel-mentionsfacebook-mentions

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sgtaziz-laravel-mentions/health.svg)

```
[![Health](https://phpackages.com/badges/sgtaziz-laravel-mentions/health.svg)](https://phpackages.com/packages/sgtaziz-laravel-mentions)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[danielme85/laravel-cconverter

Laravel 5 plug-in for currency conversion

42101.1k](/packages/danielme85-laravel-cconverter)[efficiently/larasset

Larasset is a library for Laravel 5 which manage assets in an easy way.

684.8k](/packages/efficiently-larasset)[gkermer/nova-text-auto-complete

A Laravel Nova text autocomplete field.

22115.5k1](/packages/gkermer-nova-text-auto-complete)[yieldstudio/nova-google-autocomplete

A Laravel Nova Google autocomplete field.

12218.4k](/packages/yieldstudio-nova-google-autocomplete)[nahid/linkify

Converts URLs and email addresses in text into HTML links its extended from Misd\\Linify its also support laravel 5

11136.0k1](/packages/nahid-linkify)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
