Skip to main content
Version: v1.0.0-beta.0

Installation

Install#

Via Composer

composer require myckhel/laravel-chat-system

Setup#

Publishing the config file#

php artisan vendor:publish --provider="Myckhel\ChatSystem\ChatSystemServiceProvider" --tag='config'

chat-system.php should be copied to the config directory

Publishing the migrations files#

php artisan vendor:publish --provider="Myckhel\ChatSystem\ChatSystemServiceProvider" --tag='migrations'

migration files should be copied to the database/migrations directory

Publishing the seeders files#

php artisan vendor:publish --provider="Myckhel\ChatSystem\ChatSystemServiceProvider" --tag='seeders'

seeders files should be copied to the database/seeders directory

Publishing the factories files#

php artisan vendor:publish --provider="Myckhel\ChatSystem\ChatSystemServiceProvider" --tag='factories'

factories files should be copied to the database/factories directory

Publishing all resources files#

php artisan vendor:publish --provider="Myckhel\ChatSystem\ChatSystemServiceProvider"

all resources files should be copied to the respective directories

Setup User Model#

In order to start working with chat-system, you need to setup your User model by implementing IChatEventMaker Interface and using the HasMessage, CanMakeChatEvent Traits.

use Myckhel\ChatSystem\Traits\Message\HasMessage;use Myckhel\ChatSystem\Traits\ChatEvent\CanMakeChatEvent;use Myckhel\ChatSystem\Contracts\IChatEventMaker;

class User implements IChatEventMaker{    use HasMessage, CanMakeChatEvent;...