This commit is contained in:
2025-06-27 15:24:58 +08:00
parent 8112aa5dec
commit c30ff3cca1
18 changed files with 822 additions and 73 deletions
+5
View File
@@ -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');