PHP code example of wangrunxinyes / easyswoole

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

    

wangrunxinyes / easyswoole example snippets




namespace App\HttpController;

use EasySwoole\Http\AbstractInterface\Controller;


/**
 * Class Index
 * @package App\HttpController
 */
class Index extends Controller
{
    public function index()
    {
        $this->response()->write('Hello World');
    }
}

composer or/bin/easyswoole install
php easyswoole start

php easyswoole phpunit ./vendor/easyswoole/easyswoole/tests