PHP code example of mochat / plugin-creater

1. Go to this page and download the library: Download mochat/plugin-creater 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/ */

    

mochat / plugin-creater example snippets

shell script
# 执行成功后就会得到一下如下结构的插件
plugin/maxincai/demo/
|-- composer.json
|-- LICENSE
|-- phpunit.xml
|-- README.md
|-- src
|   |-- ConfigProvider.php
|   |-- Action-------------------------------------- 动作目录(控制器)
|   |-- Constants----------------------------------- 常量目录
|   |-- Contract------------------------------------ 服务接口契约目录
|   |-- Event--------------------------------------- 事件目录
|   |-- Job----------------------------------------- 异步任务目录
|   |-- Listener------------------------------------ 事件监听器目录
|   |-- Logic--------------------------------------- 业务逻辑目录
|   |-- Model--------------------------------------- 模型目录
|   |-- Queue--------------------------------------- 异步队列目录
|   |-- Service------------------------------------- 服务目录
|   `-- Task---------------------------------------- 定时任务目录
`-- tests
    |-- bootstrap.php
    `-- Cases