{"id":15642481,"url":"https://github.com/unicodeveloper/laravel-mentions","last_synced_at":"2025-07-07T22:08:26.067Z","repository":{"id":57075419,"uuid":"42774990","full_name":"unicodeveloper/laravel-mentions","owner":"unicodeveloper","description":":couple: :package: Laravel 5 Package for enabling facebook type of mentions in your application","archived":false,"fork":false,"pushed_at":"2016-08-09T17:21:10.000Z","size":29,"stargazers_count":64,"open_issues_count":4,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-15T11:42:30.872Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unicodeveloper.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-19T13:58:02.000Z","updated_at":"2025-03-09T00:06:39.000Z","dependencies_parsed_at":"2022-08-24T14:40:30.438Z","dependency_job_id":null,"html_url":"https://github.com/unicodeveloper/laravel-mentions","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/unicodeveloper/laravel-mentions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicodeveloper%2Flaravel-mentions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicodeveloper%2Flaravel-mentions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicodeveloper%2Flaravel-mentions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicodeveloper%2Flaravel-mentions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unicodeveloper","download_url":"https://codeload.github.com/unicodeveloper/laravel-mentions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unicodeveloper%2Flaravel-mentions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264152448,"owners_count":23564940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T11:56:23.307Z","updated_at":"2025-07-07T22:08:26.030Z","avatar_url":"https://github.com/unicodeveloper.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# laravel-mentions\n\n[![Latest Stable Version](https://poser.pugx.org/unicodeveloper/laravel-mentions/v/stable.svg)](https://packagist.org/packages/unicodeveloper/laravel-mentions)\n![](https://img.shields.io/badge/unicodeveloper-approved-brightgreen.svg)\n[![License](https://poser.pugx.org/unicodeveloper/laravel-mentions/license.svg)](LICENSE.md)\n[![Build Status](https://img.shields.io/travis/unicodeveloper/laravel-mentions.svg)](https://travis-ci.org/unicodeveloper/laravel-mentions)\n[![Quality Score](https://img.shields.io/scrutinizer/g/unicodeveloper/laravel-mentions.svg?style=flat-square)](https://scrutinizer-ci.com/g/unicodeveloper/laravel-mentions)\n[![Total Downloads](https://img.shields.io/packagist/dt/unicodeveloper/laravel-mentions.svg?style=flat-square)](https://packagist.org/packages/unicodeveloper/laravel-mentions)\n\nThis package makes it possible to create text/textarea fields that enable **mentioning** by using [At.js](https://github.com/ichord/At.js).\n\nThe 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.\n\n## Installation\n\nFirst, pull in the package through Composer.\n\n```js\n\"require\": {\n    \"unicodeveloper/laravel-mentions\": \"1.1.*\"\n}\n```\n\nAnd then include these service providers within `config/app.php`.\n\n```php\n'providers' =\u003e [\n    Unicodeveloper\\Mention\\MentionServiceProvider::class,\n    Collective\\Html\\HtmlServiceProvider::class,\n];\n```\n\nIf you need to modify the configuration or the views, you can run:\n\n```bash\nphp artisan vendor:publish\n```\n\nThe package views will now be located in the `app/resources/views/vendor/mentions/` directory and the configuration will be located at `config/mentions.php`.\n\n## Configuration\n\nTo 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.\n\n```php\nreturn [\n\n    'users'    =\u003e 'App\\User',      // responds to /api/mentions/users\n    'friends'  =\u003e 'App\\Friend',    // responds to /api/mentions/friends\n    'clients'  =\u003e 'App\\Client',    // responds to /api/mentions/clients\n    'supports' =\u003e 'App\\Supporter', // responds to /api/mentions/supports\n\n];\n```\n\nSo 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.\n\n```php\n{!! mention()-\u003easText('recipient', old('recipient'), 'users', 'name') !!}\n```\n\nYou 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`\n\n```php\n{!! mention()-\u003easText('recipient', old('recipient'), 'users', 'name', 'user-form') !!}\n```\n\n## Example\n\n```html\n\u003c!doctype html\u003e\n\u003chtml lang=\"en\"\u003e\n    \u003chead\u003e\n        \u003cmeta charset=\"UTF-8\"\u003e\n        \u003ctitle\u003eLaravel PHP Framework\u003c/title\u003e\n        \u003clink rel=\"stylesheet\" type=\"text/css\" href=\"/css/jquery.atwho.min.css\"\u003e\n         \u003c!-- Requirements --\u003e\n        \u003cscript src=\"//code.jquery.com/jquery-2.1.3.min.js\"\u003e\u003c/script\u003e\n        \u003cscript src=\"/js/jquery.atwho.min.js\"\u003e\u003c/script\u003e\n        \u003cscript src=\"/js/jquery.caret.min.js\"\u003e\u003c/script\u003e\n        \u003c!-- Laravel Mentions --\u003e\n        @include('mentions::assets')\n    \u003c/head\u003e\n\n    \u003cbody\u003e\n        \u003cdiv class=\"container\"\u003e\n            {!! mention()-\u003easText('recipient', old('recipient'), 'users', 'name') !!}\n            {!! mention()-\u003easTextArea('message', old('message'), 'users', 'name') !!}\n        \u003c/div\u003e\u003c!-- /.container --\u003e\n    \u003c/body\u003e\n\u003c/html\u003e\n```\n\n\n## Install\n\nVia Composer\n\n``` bash\n$ composer require unicodeveloper/laravel-mentions\n```\n\n## Change log\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Testing\n\n``` bash\n$ composer test\n```\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## How can I thank you?\n\nWhy 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!\n\nDon't forget to [follow me on twitter](https://twitter.com/unicodeveloper)!\n\nThanks!\nProsper Otemuyiwa.\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funicodeveloper%2Flaravel-mentions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funicodeveloper%2Flaravel-mentions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funicodeveloper%2Flaravel-mentions/lists"}