Installation
Install#
Via Composer
composer require binkode/laravel-chat-systemSetup#
Publishing the config file#
php artisan vendor:publish --provider="Binkode\ChatSystem\ChatSystemServiceProvider" --tag='config'chat-system.php should be copied to the config directory
Publishing the migrations files#
php artisan vendor:publish --provider="Binkode\ChatSystem\ChatSystemServiceProvider" --tag='migrations'migration files should be copied to the database/migrations directory
Publishing the seeders files#
php artisan vendor:publish --provider="Binkode\ChatSystem\ChatSystemServiceProvider" --tag='seeders'seeders files should be copied to the database/seeders directory
Publishing the factories files#
php artisan vendor:publish --provider="Binkode\ChatSystem\ChatSystemServiceProvider" --tag='factories'factories files should be copied to the database/factories directory
Publishing all resources files#
php artisan vendor:publish --provider="Binkode\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 Binkode\ChatSystem\Traits\Message\HasMessage;use Binkode\ChatSystem\Traits\ChatEvent\CanMakeChatEvent;use Binkode\ChatSystem\Contracts\IChatEventMaker;
class User implements IChatEventMaker{    use HasMessage, CanMakeChatEvent;...