Download the PHP package phunky/laravel-messaging-reactions without Composer

On this page you can find all versions of the php package phunky/laravel-messaging-reactions. 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 laravel-messaging-reactions

Laravel Messaging Reactions

Per-message reactions for phunky/laravel-messaging. Each conversation participant can add one reaction per message. Values are plain strings — emoji, icon slugs (e.g. for Flux <flux:icon>), or any convention your UI uses.

Installation

Register the extension in config/messaging.php (add to the existing extensions array — do not remove the core keys):

Usage

Resolve ReactionService via the container (constructor injection, app(ReactionService::class), etc.):

Reacting to a message

Each participant has at most one reaction per message (one row per participant, updated in place). Only conversation participants may react — others throw an exception.

Removing a reaction

Fetching reactions

Message relationship

Message::reactions() is registered as a hasMany macro — call it as a method:

Events

ReactionAdded and ReactionRemoved extend [BroadcastableMessagingEvent](https://github.com/phunky/laravel-messaging) from the core package. They implement ShouldBroadcast and ShouldDispatchAfterCommit, respect config('messaging.broadcasting.enabled'), and use the same private conversation channels as core messaging. With Laravel Echo, listen using the broadcastAs() name with a leading dot (e.g. .listen('.messaging.reaction.added', …)).

Event Public properties broadcastAs()
ReactionAdded $reaction, $message, $messageable messaging.reaction.added
ReactionRemoved $message, $messageable, $reaction (string) messaging.reaction.removed

ReactionAdded includes the full Reaction model (participant is loaded before dispatch). ReactionRemoved passes the reaction string because the row is already gone.

License

MIT - see LICENSE.md.


All versions of laravel-messaging-reactions with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
phunky/laravel-messaging Version ^0.1.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 phunky/laravel-messaging-reactions contains the following files

Loading the files please wait ...