PHP code example of gw123 / laravel-swoole

1. Go to this page and download the library: Download gw123/laravel-swoole 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/ */

    

gw123 / laravel-swoole example snippets


prefix=/data/wwwroot/laravelTest  #项目安装目录
php_bin=/data/install/php/bin/php #php执行文件位置
app_entry=${prefix}/api/api.php   #入口脚本位置
app_pid_file=/var/run/swoole.pid  #pid文件


config/server.php
    'bind_addr' => '0.0.0.0',  //绑定地址
    'port' => 82,              //绑定端口
    'debug_ip' => ['192.168.30.1', '127.0.0.1'],//限制日志输出的服务器
    'swoole' => []             //服务器配置参数