增加发布者统计
This commit is contained in:
parent
7a1999ba64
commit
d4dc6f3018
@ -261,6 +261,16 @@ class ProgramController extends BaseController
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 添加上传者的资源数和文章数统计
|
||||||
|
$uploaderInfo['resource_count'] = Resources::where('uploader', $program['uploader'])
|
||||||
|
->where('delete_time', null)
|
||||||
|
->where('status', 1)
|
||||||
|
->count();
|
||||||
|
$uploaderInfo['article_count'] = Articles::where('author', $program['uploader'])
|
||||||
|
->where('delete_time', null)
|
||||||
|
->where('status', 2)
|
||||||
|
->count();
|
||||||
|
|
||||||
// 处理资源size
|
// 处理资源size
|
||||||
if (empty($program['size'])) {
|
if (empty($program['size'])) {
|
||||||
$attachment = Attachments::where('src', $program['icon'])
|
$attachment = Attachments::where('src', $program['icon'])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user