Skip to content

Commit

Permalink
added comments to config
Browse files Browse the repository at this point in the history
  • Loading branch information
myckhel committed Jul 14, 2021
1 parent 2f1d5c8 commit 7b72362
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 12 deletions.
53 changes: 42 additions & 11 deletions config/chat-system.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,62 @@

return [
/*
* Models
* ChatSystem Models
*/
"models" => [
"user" => "App\\Models\\User",
"conversation" => "Myckhel\\ChatSystem\\Models\\Conversation",
"conversation_user" => "Myckhel\\ChatSystem\\Models\\ConversationUser",
"message" => "Myckhel\\ChatSystem\\Models\\Message",
"chat_event" => "Myckhel\\ChatSystem\\Models\\ChatEvent",
/*
* The model you want to use as a User model needs to implement the
* `Myckhel\ChatSystem\Contracts\ChatEventMaker` contract.
*/
"user" => "App\\Models\\User",

/*
* The model you want to use as a Conversation model needs to implement the
* `Myckhel\ChatSystem\Contracts\IConversation` contract.
*/
"conversation" => Myckhel\ChatSystem\Models\Conversation::class,

/*
* The model you want to use as a ConversationUser model needs to implement the
* `Myckhel\ChatSystem\Contracts\IConversationUser` contract or extends the
* `Myckhel\ChatSystem\Models\ConversationUser`
*/
"conversation_user" => Myckhel\ChatSystem\Models\ConversationUser::class,

/*
* The model you want to use as a Message model needs to implement the
* `Myckhel\ChatSystem\Contracts\IMessage` contract or extends the
* `Myckhel\ChatSystem\Models\Message`
*/
"message" => Myckhel\ChatSystem\Models\Message::class,

/*
* The model you want to use as a ChatEvent model needs to implement the
* `Myckhel\ChatSystem\Contracts\IChatEvent` contract or extends the
* `Myckhel\ChatSystem\Models\ChatEvent`
*/
"chat_event" => Myckhel\ChatSystem\Models\ChatEvent::class,
],

/*
* Routes
* ChatSystem Routes
* Change if you want to add middleware or prefix to
* chatSystem routes.
*/
"route" => [
"middlewares" => ['api'],
"prefix" => 'api'
"prefix" => 'api'
],

/*
* Events Queues
* Change if you want to rename the broadcast queue
*/
"queues" => [
"events" => [
"message" => [
"created" => "chat",
"events" => "chat-event",
"events" => "chat-event",
],
],
"jobs" => [
Expand All @@ -39,11 +69,12 @@

/*
* Model Observers
* The class you want to use for model Observer
*/
"observers" => [
"models" => [
"chat_event" => 'Myckhel\\ChatSystem\\Observers\\ChatEventObserver',
"conversation" => 'Myckhel\\ChatSystem\\Observers\\ConversationObserver',
"chat_event" => Myckhel\ChatSystem\Observers\ChatEventObserver::class,
"conversation" => Myckhel\ChatSystem\Observers\ConversationObserver::class,
]
]
];
2 changes: 1 addition & 1 deletion docs
Submodule docs updated from adc45e to bbb743

0 comments on commit 7b72362

Please sign in to comment.