分类名称
This commit is contained in:
@@ -51,6 +51,8 @@ class PostController extends BaseController
|
||||
$data['updated_at'] = date('Y-m-d H:i:s', $data['updated_at']);
|
||||
if (isset($data['id']))
|
||||
$data['media'] = PostMedia::where('post_id', $data['id'])->get();
|
||||
if (isset($data['category_id']))
|
||||
$data['category_name'] = PostCategory::where('id', $data['category_id'])->value('name')??'';
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user