// +---------------------------------------------------------------------- namespace App\Models; /** * 配置管理-模型 * @author laravel开发员 * @since 2020/11/11 * Class ConfigModel * @package App\Models */ class ConfigModel extends BaseModel { // 设置数据表 protected $table = 'config'; /** * 详情 * @param int $id * @return array|string */ public function getInfo($id) { $info = parent::getInfo($id); // TODO: Change the autogenerated stub if ($info) { // if ($info['value'] && $info['type'] == 'image') { $info['value'] = get_image_url($info['value']); } } return $info; } }