联系官方销售客服
1835022288
028-61286886
上一篇下一篇这个重写这个报错啊,是少什么了吗
<?php namespace Phpcmf\Model\Work;
// 模块内容模型类
class Content extends \Phpcmf\Model\Content {
// 格式化显示内容
public function _call_show($data) {
// 上一篇文章
$builder = \Phpcmf\Service::M()->db->table($this->work);
$builder->where('status', 9);
$builder->where('id<', $data['id'])->orderBy('id desc');
$data['prev_page'] = $builder->limit(1)->get()->getRowArray();
// 下一篇文章
$builder = \Phpcmf\Service::M()->db->table($this->work);
$builder->where('status', 9);
$builder->where('id>', $data['id'])->orderBy('id asc');
$data['next_page'] = $builder->limit(1)->get()->getRowArray();
return $data;
}
}