Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How are you using laravel-messenger? #55

Closed
cmgmyr opened this issue Jul 16, 2015 · 67 comments
Closed

How are you using laravel-messenger? #55

cmgmyr opened this issue Jul 16, 2015 · 67 comments
Labels

Comments

@cmgmyr
Copy link
Owner

cmgmyr commented Jul 16, 2015

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!

@mrgwilliam
Copy link

Implementing it for a Unit Manager internal messaging system. We aim to support at most 150+ users. Currently only using base functionality. I'll update I add anything more. Thanks for this awesome package!

@nuukcillo
Copy link

We are using it for the same that mrgwilliam, but we are also implementating a notification system with other parts of the site. We have around 500 users in the site but the messenger is still in beta.

@Pandahisham
Copy link

we are implementing it in an in-school network , however , having seen laravel 5.1 shouldbroadcast , we are thinking about using socket.io to build a realtime messaging platform , have you given any thought about this ? there's a package called 'confer' that already does this but with pusher

@mydnic
Copy link

mydnic commented Aug 13, 2015

We are using it as a facebook-like private message system in a community website.
Thanks for this package !

@cmgmyr
Copy link
Owner Author

cmgmyr commented Aug 13, 2015

Thank you all for the great feedback so far!

@Pandahisham in the new version I'm planning on using events, so you'll be able to hook into those pretty easily. You'll still have to handle the front end processing on your own. I don't think it makes sense (at least at this time) to do anything with Pusher, or other services, inside this package

@Pandahisham
Copy link

yap ! we will handle the frontend ourselfves , just give us a well documented package with hints to how it may work with say pusher or socket.io , leave the rest to us

@IJack
Copy link

IJack commented Sep 21, 2015

Thanks for the nice package, works fine.

But I got an error when I make a migration:refresh after a time: Class "AddSoftdeletesToThreadTable" not found. The migration file with it class is in the migration folder. Don't know what I'm doing wrong

@antonkomarev
Copy link
Contributor

@Pandahisham just check this repo. It's pretty good boilerplate to make this package work with Pusher https://github.com/cmgmyr/laravel-messenger-pusher-demo

@Pandahisham
Copy link

@a-komarev and @cmgmyr thanks !! i may have to re-purpose that to socket.io though

@talha08
Copy link

talha08 commented Dec 6, 2015

How can I run this in my project , I have no idea... .. I followed all the instructions but its not working :( I am using laravel 4.2 version ...anyone here to help me please!!

@cmgmyr
Copy link
Owner Author

cmgmyr commented Dec 6, 2015

@talha08 if you have a specific thing you need help with, please create a new issue ticket with more information. This isn't the correct issue for help. With Laravel 4, you should be using the 1.x version. I hope that helps.

@FrankDupree
Copy link

@cmgmyr Using it as a personal messaging system with the phphub china community forum.
you could check it out here. Phphub++

@Gummibeer
Copy link

In a Game-Webinterface for an Arma3 Altis Life Server.

AS additional features I've added Markdown and a PHP side Twemoji Class that replaces some codes with the SVGs for the twemojis.

For me this is a very good package cause it just comes with the needed things and is easy customizable.

@bgies
Copy link

bgies commented Jan 22, 2016

I'm not using it yet, but I'm planning on using it to support messaging between the website admins and the users... it seems very well suited for that

@sger
Copy link

sger commented Feb 13, 2016

Great package just created a demo app with Laravel 5.2

https://github.com/sger/laravel-messenger-demo

@cmgmyr
Copy link
Owner Author

cmgmyr commented Feb 13, 2016

Thanks for the demo @sger! I've been toying with the idea of making a live working demo that people can log in to, but just haven't had the time recently. Definitely on my to-do list though.

@3traker
Copy link

3traker commented Mar 10, 2016

Great package just created a demo app with Laravel 5.2

https://github.com/sger/laravel-messenger-demo

404 :(

@SAIBA0011
Copy link

I'm using it for a friends messaging system :) Planning on using this for a open forum type as well.

@sger
Copy link

sger commented Mar 16, 2016

@3traker
Copy link

3traker commented Mar 21, 2016

Thanks!

@xuan9230
Copy link

Hi, in my website there are two different kinds of users(multi auth), let's say "cop" and "thief" instead of one kind of "user". Can I still use this package?
Thanks!

@antonkomarev
Copy link
Contributor

@xuan9230 of course. You can extend Thread model or even write your own to fit your requirements. This package provides a structure which you can adapt for your needs.

@xuan9230
Copy link

@a-komarev So I've noticed "user" appears a lot in several files (Thread, MessengerServiceProvider, Participant...) Should I change every single one of them? That seems to be such a huge workload...

@cmgmyr
Copy link
Owner Author

cmgmyr commented Mar 24, 2016

@xuan9230 nope, all you have to do is publish the config file and update the reference to the "user" model you want here. All of the references to your model will get mapped automatically. Also, if you have any questions/issues with the package, please open a new ticket so we can reserve this one for feedback related comments

@xuan9230
Copy link

@cmgmyr thanks man! I will open a new ticket once I figured out the entire process:)

@groundbreaker08
Copy link

@cmgmyr implementing it on our private network! :D Thank you for this package.

@Moussa112
Copy link

@cmgmyr Realy nice package you have here! Thanks a lot! I would like to use it in my project as some sort of private direct messaging service betweens users. But I can't seem to find a way to make it "private". I used to code provided in the controller to show only the threads you are participating in so that's cool but you can still go to the "messages" you are not participating in by changing the url like so for example: "messages/1". Is there a way provided in your package to make this secure? Thanks in advance!

@cmgmyr
Copy link
Owner Author

cmgmyr commented Jun 2, 2016

@Moussa112 thanks for using the package! There isn't anything built directly into this package for private one-to-one messaging, I left that up to the developer since there are multiple ways that you can implement it. Please take a look at #29 for some helpful info. I'm going to be writing up some additional information about how to do this soon.

@cihadturhan
Copy link

We implemented an internal messaging module in our private course website thanks to your package. Also, we made some modifications to send bulk messages to everyone.

image

@h-azad
Copy link

h-azad commented Jan 7, 2017

Hi... When I'm trying to migrate database it's showing. I already have a messages table in my database. I think this maybe a problem --> Cannot redeclare class CreateMessagesTable ..... So now what to do ??

@cmgmyr
Copy link
Owner Author

cmgmyr commented Jan 7, 2017

@sidor555 can you please open a new issue with more information?

@reliq
Copy link

reliq commented Apr 13, 2017

We're using your package here and at studentroomsja.com.

Thank you for an awesome package man!

🍻 cheers!

@cmgmyr
Copy link
Owner Author

cmgmyr commented Apr 13, 2017

Very cool @reliq, thanks for sharing!

@asimshazad
Copy link

Sorry @reliq ,i can't find this package on studentroomsja.com :(

@reliq
Copy link

reliq commented Apr 18, 2017

Hey @asimshazad, we're basically it for the member chat feature on that site (http://stuentroomsja.com). The feature isn't actually open to the public. The chat is currently only available to people with 'room requests'.

@Rostom22
Copy link

Rostom22 commented May 2, 2017

Hi, can i add attached-file fonctionnality to this package ? thanks.

@antonkomarev
Copy link
Contributor

@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
Copy link

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

@DavisAre
Copy link

DavisAre commented May 4, 2018

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
Copy link

herryswastika commented Feb 14, 2019

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
Copy link
Owner Author

cmgmyr commented Feb 14, 2019

so cool, thanks for sharing!

@cmgmyr cmgmyr pinned this issue May 31, 2019
@mustafa-online
Copy link

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

@simonj
Copy link

simonj commented Oct 9, 2019

@Mu9tafa-Online I want that too 👍

@yudi-glive
Copy link

yudi-glive commented Oct 15, 2019

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
Copy link

alkaou commented Dec 9, 2019

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
Copy link
Owner Author

cmgmyr commented Dec 9, 2019

@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.

Repository owner deleted a comment from alkaou Dec 10, 2019
@RTippin
Copy link

RTippin commented Dec 24, 2019

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
Copy link

dendoy commented Feb 6, 2020

thanks for an awesome package....
Dashboard_BinaKarir

@debuGhy
Copy link

debuGhy commented May 10, 2020

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
Copy link

pionas commented May 18, 2020

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
Copy link

BrunoBasstos commented Jul 21, 2020

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
Copy link

ghost commented Sep 14, 2020

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

@ghost ghost mentioned this issue Sep 14, 2020
@prog-24
Copy link

prog-24 commented Apr 9, 2021

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

It works great.

@cmgmyr cmgmyr unpinned this issue Nov 19, 2021
Repository owner locked and limited conversation to collaborators Nov 19, 2021
@cmgmyr cmgmyr closed this as completed Nov 19, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests