添加SEO
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\SeoModel::createSeo |
| 所属业务 | 站点内容 |
| 来源模块/系统 | SEO模型 |
功能说明
添加SEO
调用示例
$param = ['language' => 'zh-cn', 'title' => '示例名称', 'page_address' => 'string', 'keywords' => '示例关键字', 'description' => '192.0.2.1'];
$result = (new \app\common\model\SeoModel())->createSeo($param);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
param.language | string | 否 | — | — | 语言zh-cn,en-us |
param.title | string | 是 | — | required | 标题 |
param.page_address | string | 是 | — | required | 页面地址 |
param.keywords | string | 是 | — | required | 关键字 |
param.description | string | 是 | — | required | 描述 |
返回值
未声明固定返回值。
正常返回
{}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |