Download the PHP package metko/galera without Composer
On this page you can find all versions of the php package metko/galera. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package galera
galera
Galera is small package to handle conversation between two or multiple user.
Installations
Step 1
Step 2
Publish the config file and the asset
How to use it
Usage
Use the trait
Use the trait Galerable in your user model
Conversation
Create a conversation
Get a conversation
Return a conversation with [‘messages_count’, ’unread_messages_count’] by default
Clear a conversation
Will soft delete all the message of the given conversation
Close a conversation
Nobody can submit a message in a close conversation
Check if a conversation is closed
Add participants in a conversation
A Conversation can remove a participant
A conversation must have at least 2 participants. It will return an error if you try to do it.
Read all message of a conversation
A conversation must have at least 2 participants. It will return an error if you try to do it.
User
A user can write a message
Delete a message
Write a message refering another
Check if a user has unread message on a specific conversation
Get unread messages for user
Read all the message unread for a user in a conversation
Return a list of all conversation ordered by updated_at, count of message, and unread_message_count
Get the last conversation of a user
Return a list of all conversation ordered by updated_at, count of message, and unread_message_count
Messagess
Get messages from a conversation
Get a unread_message count in conversation
Get a total_message count n conversation
Test cases
The package includes three test cases:
TestCase
- Effectively the normal Laravel test case. Use it the same way you would your normal Laravel test caseSimpleTestCase
- Extends the default PHPUnit test case, so it doesn’t set up a Laravel application, making it quicker and well-suited to properly isolated unit testsBrowserKitTestCase
- Sets up BrowserKit