| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- // +----------------------------------------------------------------------
- // | Laravel框架 [ Laravel ]
- // +----------------------------------------------------------------------
- // | 版权所有 2017~2021 Laravel研发中心
- // +----------------------------------------------------------------------
- // | 官方网站: http://www.laravel.cn
- // +----------------------------------------------------------------------
- // | Author: wesmiler <12345678@qq.com>
- // +----------------------------------------------------------------------
- namespace App\Models;
- /**
- * 文章管理-模型
- * @author wesmiler
- * @since 2020/11/11
- * Class ArticleModel
- * @package App\Models
- */
- class ArticleModel extends BaseModel
- {
- // 设置数据表
- protected $table = 'article';
- /**
- * 获取记录信息
- * @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['thumb']) {
- $info['thumb'] = get_image_url($info['thumb']);
- }
- }
- return $info;
- }
- }
|