Closed mortezaf closed 7 years ago
What you mean by Close a thread? Prevent anybody to write there or make it password protected?
One of the solutions is extend Thread model, add functionality you need for it and switch from default model to your custom one in config/messenger.php
.
'thread_model' => App\YourCustomThread::class,
i mean to Prevent anybody to write?
Then add is_closed
boolean column to your threads database table, extend Thread
model with your own class where you will make checks if thread is closed\opened and handle close()
method which will change is_closed
value. Then instruct Laravel Messenger in package config to use your extended version of Thread instead of default one (read my previous comment).
This package provides only base functionality required for all of the messenger features and gives developer an ability to extend behavior with their own business requirements. It's not Out of the box solution for all messenger use cases, look on it as on framework to create your messenger.
@MortezaFathi, @a-komarev's outline is the only way to do this with the package at the moment. Again, this is done to leave the option for the developer to implement any options or implementations needed. We've discussed adding some additional actions to the package (see #153), but these haven't been fleshed out fully or implemented yet. Feel free to add some more information or usages to that issue number if you'd like.
Thanks for using the package!
Hi man tanx a lot for this awesome package How can i close a thread?