新增文章统计;新增浏览文章查看

This commit is contained in:
2023-06-28 16:09:53 +08:00
parent 9b29c5c67a
commit 37c20ae141
3 changed files with 23 additions and 8 deletions

View File

@@ -14,6 +14,11 @@ class PostVisit extends Model
{
//
public function post()
{
return $this->belongsTo(Post::class, 'post_id');
}
public function getAvatarSrcAttr()
{
$value = $this->getAttr('avatar');