ChatSystem Models
#
Using ChatSystem Modelsuse Myckhel\ChatSystem\Models\Conversation;use Myckhel\ChatSystem\Models\Message;use Myckhel\ChatSystem\Models\ConversationUser;use Myckhel\ChatSystem\Models\ChatEvent;
Conversation::get();Message::get();ConversationUser::get();ChatEvent::get();
ChatSystem
Models#
Controlling ChatSystem
Models#
Extending You may want to take control of some models, for example, caching model queries.
You may take control by extending the models and registering the model through the chatsystem
config.
namespace App\Models;
use Myckhel\ChatSystem\Models\Message as BaseMessage;use QueryCache;
class Message extends BaseMessage{ use QueryCache;}
#
Registering ChatSystem Modelsmake sure you have published the chatsystem config file. see publishing-the-config-file
...return [... /* * Models */ "models" => [ ... // register Message model "message" => "App\\Models\\Message", ],...
ChatSystem
models#
Using registered use App\Models\Message;
Message::get();