hyperf说明

https://www.hyperf.io

文件结构

/.env 配置文件
/config/* 目录下
/config/autoload/server.php  server.php 配置说明
  • 热加载
#https://hyperf.wiki/2.2/#/zh-cn/watcher?id=%e7%83%ad%e6%9b%b4%e6%96%b0-watcher
composer require hyperf/watcher --dev
php bin/hyperf.php server:watch
  • 获取数据配置信息
#https://www.cnblogs.com/aln0825/p/13967286.html
use Hyperf\Contract\ConfigInterface;
/**
* @Inject
* @var ConfigInterface
*/
protected $config;

var_dump($this->config->get('redis' ));
var_dump($this->config->get('databases' ));
#创建模型
#php bin/hyperf.php gen:model tablename
  • 安装插件
composer require hyperf-ext/jwt