PHP code example of jizhi / webman-api

1. Go to this page and download the library: Download jizhi/webman-api 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/ */

    

jizhi / webman-api example snippets


 return [
      // ........
     'guard' => [
         // 添加 api
         'api' => [
             'key' => 'id',
             'field' => ['id','name','email','mobile'], //设置允许写入扩展中的字段
             'num' => 0, //-1为不限制终端数量 0为只支持一个终端在线 大于0为同一账号同终端支持数量 建议设置为1 则同一账号同终端在线1个
             'model'=> User::class
         ]
     ],
    // ........
bash
php webman api:install