文章
This commit is contained in:
@@ -54,6 +54,11 @@ class ArticleModel extends Model
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
public function comment()
|
||||
{
|
||||
return $this->hasMany(CommentModel::class, 'article_id', 'id');
|
||||
}
|
||||
|
||||
public function creater()
|
||||
{
|
||||
return $this->belongsTo(AdminsModel::class, 'user_id','id');
|
||||
|
||||
Reference in New Issue
Block a user