Download the PHP package coliving/talk without Composer

On this page you can find all versions of the php package coliving/talk. 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 talk

Coliving-Talk

This is fork from Nahid/Talk to change it works with new Laravel 8, 9, 10, 11. Talk is a Laravel 8, 9, 10, 11 based realtime messaging, chatting and conversation system. It helps to develop users messaging, chatting and conversations in easy way.

Laravel-Talk

Awesome Laravel GitHub license Build Status

Talk is a Laravel 8, 9, 10, 11 based user conversation (inbox) system with realtime messaging. You can easily integrate this package with any Laravel based project. It helps you to develop a messaging system in just few minutes. Here is a project screenshot that was developed by Talk.

Talk v2.1.0 supports realtime messaging. Learn more about Talk Live Messaging

Feedback

If you already used Talk, please share your experience with us. It will make the project better.

Give us your feedback

Built with Talk

If you are using Talk in your project please share your project URL or project name with us. It will inspire other people to use Talk.

See which project was Built with Talk

Caution

Do not migrate 1.1.7 from its higher version directly. Please try our sample project first and then apply it on your project.

Talk-Example Screenshot

You may try Talk-Example project.

Or you can try live Demo by using this credentials

So let's start your tour :)

Features

Installation

Talk is a Laravel package so you can install it via composer. Run this command in your terminal from your project directory.

Wait for a while, Composer will automatically install Talk in your project.

Configuration

When the download is complete, you have to call this package service in config/app.php config file. To do that, add this line in app.php in providers section

To use facade you have to add this line in app.php in aliases array

Now run this command in your terminal to publish this package resources

After running this command, all necessary file will be included in your project. This package has two default migrations. So you have to run migrate command like this. (But make sure your database configuration is configured correctly.)

Okay, now you need to configure your user model for Talk. Go to config/talk.php and config it.

Usage

Its very easy to use. If you want to set authenticate user id globally then you have to set a middleware first. Go to app/Http/Kernel.php and set it in $routeMiddleware array

And now you can use it from anywhere with middleware. Suppose you have a Controller and you want to set authenticate user id globally, then write this in controller constructor

But instead of setting id globally, you can use these procedure from any method in controller.

Now you may use any method that you need. But if you want to pass authentic id instantly, this method may help you.

Please see the API Doc.

API List

setAuthUserId

setAuthUserId method sets the currently loggedin user id, which you pass through parameter. If you pass null or empty value then it returns false.

Syntax

Example

Constructor of a Controller is the best place to write this method.

When you pass logged in user ID, Talk will know who is currently authenticated for this system. So Talk retrieve all information based on this user.

user

You may use this method instead of setAuthUserId() method. When you have to instantly access users conversations then you may use it. Syntax

Example When you haven't set authenticated user id globally, then you just use this method directly with others method.

isConversationExists

This method checks currently logged in user and if given user is already in conversation

Syntax

Example

isAuthenticUser

isAuthenticUser checks if the given user exists in given conversation.

Syntax

Example

sendMessage

You can send messages via conversation id by using this method. If the message is successfully sent, it will return objects of Message model otherwise, it will return false

Syntax

Example

sendMessageByUserId

You can send message via receiver id by using this method. If the message is successfully sent, it will return objects of Message model otherwise, it will return false

Syntax

getInbox

If you want to get all the inboxes except soft deleted message , this method may help you. This method gets all the inboxes via previously assigned authenticated user id. It returns collections of message thread with latest message.

Syntax

Example

getInboxAll

Its similar as getInbox() method. If you want to get all the inboxes with soft deleted messages, this method may help you. This method gets all the inboxes via given user id.

Syntax

threads

This method is an alias of getInbox() method.

Syntax

threadsAll

This method is an alias of getInboxAll() method.

Syntax

getConversationsById

When you want to get all the conversations using your desired conversation id, you can try this method. This method returns all the conversations(except soft deleted) with sender and withUser objects

Syntax

Example

This method returns two objects messages and withUser. messages object contains messages collection and withUser object contains participant User collections.

Let's see how to use it with your views

getConversationsAllById

This method is similar as getConversationsById(). The only difference between this method is its return all messages with soft deleted items.

Syntax

getConversationsByUserId

When you want to get all the conversations using your desired receiver id, you can try this method. This method returns all the conversations(except soft deleted message) with user's objects

Syntax

getConversationsAllByUserId

This method is similar as getConversationsByUserId(). The only difference between this method is it returns all messages with soft deleted items.

Syntax

getMessages

This is a alias of getConversationsById() method.

Syntax

getMessagesAll

This is a alias of getConversationsAllById() method.

Syntax

getMessagesByUserId

This is a alias of getConversationsByUserId() method.

Syntax

getMessagesAllByUserId

This is a alias of getConversationsAllByUserId() method.

Syntax

readMessage

If you want to read a single message then you may use it. This message is return a single message object by message id.

Syntax

getReceiverInfo

This method returns all the information about message receiver.

This method is deprecated from version 2.0.0 and it will be removed from version 2.0.2

Syntax

makeSeen

If you want to set a message as seen you can use this method.

Syntax

deleteMessage

When you want to delete a specific message from a conversation, you have to use this method. This method soft delete message for both user-end individually.

Syntax

deleteForever

If you want to hard delete or permanently delete a specific message then you have to use this method

Syntax

deleteConversations

This method is used to permanently delete all conversations

Syntax

Realtime Messaging

Talk also support realtime messaging thats called Talk-Live. Talk use pusher for realtime message. So first you have to configure pusher. Go to app/talk.php again and configure.

in this new version broadcast section was added with talk config. Here broadcast is disabled by default. If you want to enable live(realtime) messaging then you have to enable it first. Then add pusher credentials. Thats it. Everytime when you send message then talk will automatically fire two event, one for specific user and second for specific conversation. So you may listen or subscribe one or both as per your wish. Finally you have to subscribe these events by using talk_live() helper function. Go to where you want to subscribe to work with message data follow this code.

talk_live() supports one parameters as array. The first parameter is for channel name which you want to subscribe. You have not know which channel was broadcast. Talk broadcast two channel by default. One for user and second for conversation. If you want to subscribe channel for currently loggedin user then you have to pass

logedin user id in 'user' key. ['user'=>['id'=>auth()->user()->id, 'callback'=[]] or you want to subscribe for conversation id you have pass conversation id as 'conversation' key. ['conversation'=>['id'=>$conversationID, 'callback'=>[]]. You may pass both if you want.

You can pass a callback for working with pusher recieved data. For both user and conversation section support callbacks as array. So you can pass multiple callback as array value that was shown in previous example.

You can watch Talk-Live-Demo

Try Demo Project

Talk-Example

Special Thanks To

Shipu Ahamed

Thanks :)

Support for this project

Hey dude! Help me out for a couple of :beers:!

Beerpay Beerpay


All versions of talk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
illuminate/contracts Version 8.* || 9.* || 10.* || 11.*
illuminate/support Version 8.* || 9.* || 10.* || 11.*
coliving/repositories Version ^1.3
nesbot/carbon Version ^2.25.0
pusher/pusher-php-server Version ^7.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 coliving/talk contains the following files

Loading the files please wait ....