Download the PHP package asmit/filament-mention without Composer

On this page you can find all versions of the php package asmit/filament-mention. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-mention

Filament Mention

The Mention plugin allows you to easily mention users in your Filament application using the Filament RichText editor. It supports extracting specific fields from the mentioned user, such as their username, and id. The plugin offers both static search (preloaded data) and dynamic search (real-time database queries) for mentions.

Filament Mention Plugin

Packagist Packagist Packagist Packagist Packagist


Features

Requirements

Installation

  1. Install the package via Composer:

  2. After installation and update please run the following command to publish the assets:

  3. Publish the configuration file:

This will create a filament-mention.php file in your config directory. You can customize the configuration according to your needs.


Upgrading from 1.x to 2.x

If you are upgrading from version 1.x to 2.x, please note these changes:

  1. The configuration key search_key is now search_column.
  2. The HasMentionable trait is now HasMentionableForm.
  3. The mentionsItems method is now mentionableItems.
  4. The form data structure after pluck is change.

  5. The FetchMentionEditor is deprecated. You can use dynamic search with getMentionableItemsUsing method in the RichMentionEditor field.

Configuration

The configuration file (config/filament-mention.php) allows you to customize the plugin behavior. Here's an example configuration:


Key Configuration Options:

Recommendations:


Usage

1. Static Search

Static search preloads all mentionable data and searches within that dataset. For static search you can you RichMentionEditor field.

The RichMentionEditor fetch all the mentionable data first and then search the mention item from the fetched data.

You can also change the data by pass the closure function mentionableItems in the RichMentionEditor field.

example:

Key Points

NOTE: If you not use mentionableItems then it will use the configuration from config file.

2. Dynamic Search

To enable this feature you need to use the HasMentionableForm in to your livewire page.

Next, you can search the mentionable data from the database using the getMentionableItemsUsing method in the RichMentionEditor field.


Pluck

The plugin allows you to extract specific fields from the mentioned user. You can use the pluck method to extract the fields. This feature helps you to customize the mention output according to your needs.

The pluck method accepts the key to extract the field from the mentioned user. The key should be id or username. It extracts the data from the MentionItem and return the data in the array format.

It will add the new data attribute named mentioned_[YOUR PLUCK LEY]. If you inspect the data it will return like


Advanced Features

Multiple Trigger Characters

You can use different characters to trigger different types of mentions. This is useful when you want to mention different types of entities (e.g., users, tags, variables).

You can also configure each trigger character separately:

Global Object Search

The plugin now supports searching across all properties of an object without requiring a specific lookup key. This makes it easier to find matches regardless of which field contains the search text.

Prefix and Suffix

You can add custom text before and after mentions. This is particularly useful for variables or special formatting.

You can also configure prefix and suffix for specific trigger characters:

Customizable Title and Hint Fields

You can configure which fields to use for the title and hint in the dropdown menu:

Or for specific trigger characters:

Example: Variables with Prefix and Suffix

Here's an example of using the plugin to insert variables with % prefix and suffix:


Credits

Security

If you discover a security vulnerability within this package, please send an e-mail to [email protected], All security vulnerabilities will be promptly addressed.

🤝 Contributing

Please see CONTRIBUTING for details.

📄 License

The MIT License (MIT). Please see License File for more information.

Made with love by Asmit Nepali


All versions of filament-mention with dependencies

PHP Build Version
Package Version
Requires filament/support Version ^3.0
filament/forms Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package asmit/filament-mention contains the following files

Loading the files please wait ....