1. Go to this page and download the library: Download tsaotai/tsaotai-pro 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/ */
use tsaotai\pro\Http\ProGateway;
use tsaotai\pro\Contracts\Responder;
class ProController implements Responder
{
public function dispatch()
{
return ProGateway::dispatch(
(string) $this->request->param('plugin', ''),
(string) $this->request->param('name', ''),
(string) $this->request->param('action', ''),
$this
);
}
public function ok($data = null, string $msg = '') { /* JSON ok */ }
public function fail(string $msg, int $code = 1, $data = null) { /* JSON fail */ }
public function