ChatSystem Models
#
Using ChatSystem Modelsuse Binkode\ChatSystem\Models\Conversation;use Binkode\ChatSystem\Models\Message;use Binkode\ChatSystem\Models\ConversationUser;use Binkode\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 Binkode\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();