PHP code example of deskti / laravel-chat

1. Go to this page and download the library: Download deskti/laravel-chat library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

deskti / laravel-chat example snippets


php artisan vendor:publish

Chat::messageRead($messageId, $userId); //$userId marks the mesage as read

Chat::addParticipants($conversation->id, $userId3); //add one user

Chat::addParticipants($conversation->id, [$userId3, $userId4]); //add multiple users