### 創建模型
php bin/hyperf.php gen:model Users
### 配置數據庫連接 .evn配置鏈接
APP_NAME=skeleton
DB_DRIVER=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=swoole
DB_USERNAME=swoole
DB_PASSWORD=swoole
DB_CHARSET=utf8mb4
DB_COLLATION=utf8mb4_unicode_ci
DB_PREFIX=
### curd的練習操作
#### 查詢單條
$users = User::query()->first();
#### 查詢全部
$users = User::all();
#### 分頁查詢
$users = User::query()->paginate(2);
#### 添加
$user = new User();
$user->username = 'abc' . mt_rand(1000, 9999);
$user->create_at = time();
$user->update_at = time();
$res = $user->save();
#### 修改
$users = User::query()->find(1);
$user->username = 'abc' . mt_rand(1000, 9999);
#### 刪除
$id = $this->request->input('id');
User::destroy($id);