// +---------------------------------------------------------------------- namespace App\Models; /** * 动态管理-模型 * @author wesmiler * @since 2020/11/11 * Class DynamicModel * @package App\Models */ class DynamicModel extends BaseModel { // 设置数据表 protected $table = 'dynamic'; /** * 获取记录信息 * @param int $id 记录ID * @return array|string * @author wesmiler * @since 2020/11/11 */ public function getInfo($id) { $info = parent::getInfo($id); // TODO: Change the autogenerated stub if ($info) { // 图片 if ($info['albums']) { $info['albums'] = json_decode($info['albums'], true); } } return $info; } }