cmgmyr / laravel-messenger

Simple user messaging package for Laravel
MIT License
2.45k stars 514 forks source link

How are you using laravel-messenger? #55

Closed cmgmyr closed 2 years ago

cmgmyr commented 9 years ago

Please leave a comment explaining how you are using this package. How many users are you supporting? What type of features have you had to implement to extend the base functionality of this package?

*If you have any issues, please open up a new ticket. Please keep this thread for feedback only. Thanks!

antonkomarev commented 7 years ago

@Rostom22 For questions its better to make issues. This thread used to share projects where this package is used. Answer to your question: #162

aarontanzk commented 6 years ago

Hi anyone has one-to-one messenging feature example project?

DavisAre commented 6 years ago

Thank you for creating this package. Although I have created similar PM systems in plain-php, I didn't want to re-invent the wheel this time. Took some hours of modifying and this is the result. It's an implementation for my bachelor's thesis project. ;) My example

herryswastika commented 5 years ago

I use Laravel. I combine the laravel-messenger with email notification with Mailgun and Amazon SES. Working very very good. User can also send message directly to Admin without knowing who the Admin is (with admin role). I also use Summernote rich text editor so laravel-messenger message body could contain image, picture, video link, etc. I have planning to create chat directly from Post model, but still considering it given that comment section is provided. User can also opt to 'GetMeOut' if he/she does not longer want to be included in the thread message (although I assume his/her boss will get angry because the App is intended to be used in a company) thread_lq thread_admin thread_notifemail thread_unsub

cmgmyr commented 5 years ago

so cool, thanks for sharing!

mustafa-online commented 5 years ago

can I use this package with two separate models? "User" and "Manager" ??

simonj commented 4 years ago

@Mu9tafa-Online I want that too 👍

yudi-glive commented 4 years ago

We're using this package to provide instant messages to our users. Glive connects artists, agencies and contractors. They can meet new contacts and keep in touch with messages. We're developing more advanced messaging features like contract attachments, event planning and more.

This package allows the customization of the message system to our needs. Thank you for this excellent package.

https://glivesol.com messenger_demo_2

alkaou commented 4 years ago

Please helps me here, i have a serious problem, use Laravel 5.8 i really need your helps

https://stackoverflow.com/questions/59249412/get-the-users-who-are-sent-themselves-of-the-messages-with-the-last-messages-and

cmgmyr commented 4 years ago

@alkaou this thread is not for asking for help. Please add a new, detailed, issue in the repo or wait for someone to respond on stack overflow.

RTippin commented 4 years ago

Actually started using this package along with an expanded version of this package (https://github.com/lexxyungcarter/laravel-5-messenger) as a base in April 2018, but ended up extracting out your SRC files, using the models as a base reference, and building back up from scratch. We needed to be able to message between any models we choose, so switched to using morphs on everything. Ended up building so much on top, I am starting to extract it out into a standalone package I too would like to release as an entire suite! But your base helped us get the jump start we needed, so thanks! I added support for group invite links like discord, video calling/group calling, bobble heads (read indicators), images, documents, links, youtube support. Privacy and friends list are also integrated

71425952-e5187780-2670-11ea-8390-583970b6ba82

71425992-5821ee00-2671-11ea-94a5-488215856885

dendoy commented 4 years ago

thanks for an awesome package.... Dashboard_BinaKarir

debuGhy commented 4 years ago

thanks for an awesome package.... Dashboard_BinaKarir

Hello I know its bit late to ask a question. But I would like to know how to show the conversations in timeline mode like you are doing? I am using $thread->messages to display all the messages between two users. But I want to display the message from the sender like you are doing in blue and the receiver of the message in white. I want to implement the conversation view like you are doing. How to achieve it? Kindly help.

pionas commented 4 years ago

Hello. I am rebuilding my website and looked a package for messages between users. Your package looks nice but i added two changes.

Firstly. In Thread model i added new scope:

    /**
     * Returns threads that the user is associated with and sorts start from unreads.
     *
     * @param \Illuminate\Database\Eloquent\Builder $query
     * @param int $userId
     *
     * @return \Illuminate\Database\Eloquent\Builder
     */
    public function scopeForUserOrderByNotReadMessages(Builder $query, $userId)
    {
        $participantTable = Models::table('participants');
        $threadsTable = Models::table('threads');

        $orderBy = 'IF(`' . $participantTable . '`.last_read IS NULL, 2, IF (`' . $threadsTable . '`.updated_at>`' . $this->getConnection()->raw($this->getConnection()->getTablePrefix() . $participantTable) . '`.last_read, 2, 0)) DESC';
        return $query->join($participantTable, $this->getQualifiedKeyName(), '=', $participantTable . '.thread_id')
                ->where($participantTable . '.user_id', $userId)
                ->whereNull($participantTable . '.deleted_at')
                ->orderByRaw($orderBy)
                ->select($threadsTable . '.*');
    }

Secondly. I modified getParticipantFromUser method.

    public function getParticipantFromUser($userId)
    {
        if ($this->relationLoaded('participants')) {
            $participant = $this->participants->where('user_id', $userId)->first();
            if (is_null($participant)) {
                throw new ModelNotFoundException();
            }
            return $participant;
        }
        return $this->participants()->where('user_id', $userId)->firstOrFail();
    }

And i used this:

Thread::forUserOrderByNotReadMessages($userID)->with(['participants' => function ($query) use ($userID) {
        $query->where('user_id', $userID);
    }])->latest('updated_at')->paginate(50);

These changes reduce the number of queries and the page loads faster :)

BrunoBasstos commented 4 years ago

I'm studying laravel and I've decided to rebuild an application using it. One of the new features will be users chat and your package was just what I needed. Made some adjustments to star and archive messages and thats it! Thanks a lot for the great work! Here is how it looks...

chat-demo

ghost commented 4 years ago

Hello every bady 88055316-2a345780-cb35-11ea-8f20-664ab2f2f87e Mana natija

prog-24 commented 3 years ago

Using this project to power messaging on our platform. simulator_screenshot_7272839B-FDA6-4E30-B920-FA228BBB9ADF

It works great.