|
|
@@ -35,6 +35,13 @@ class Article extends Model
|
|
|
public function aricleIgnore()
|
|
|
{
|
|
|
return $this->belongsTo(ArticleIgnore::class, 'id', 'article_id');
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 定义与分类的一对一关系
|
|
|
+ */
|
|
|
+ public function user()
|
|
|
+ {
|
|
|
+ return $this->hasOne(User::class, 'id', 'admin_user_id');
|
|
|
}
|
|
|
/**
|
|
|
* The attributes that are mass assignable.
|