|
|
@ -94,4 +94,15 @@ class Article extends ArticleModel |
|
|
|
->paginate($limit); |
|
|
|
->paginate($limit); |
|
|
|
return static::preload($list, ['image', 'category']); |
|
|
|
return static::preload($list, ['image', 'category']); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function helpCenter() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$list = $this->withoutField(['content']) |
|
|
|
|
|
|
|
->where('status', '=', 1) |
|
|
|
|
|
|
|
->where('is_delete', '=', 0) |
|
|
|
|
|
|
|
->order(['sort' => 'asc', 'create_time' => 'desc']) |
|
|
|
|
|
|
|
->select()->toArray(); |
|
|
|
|
|
|
|
$data = static::preload($list, ['image', 'category']); |
|
|
|
|
|
|
|
return $data; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |