PHP code example of johnnylei / message-system

1. Go to this page and download the library: Download johnnylei/message-system 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/ */

    

johnnylei / message-system example snippets


// 原理就是往message_queue_subscription表里面插入一条数据,表示某个用户监听了某个队列
$subscription = new MessageQueueSubscription();
$subscription->subscription($userId, $queueId);