|
|
@@ -25,9 +25,9 @@ class Article extends Model
|
|
|
/**
|
|
|
* 定义与分类的多对一关系
|
|
|
*/
|
|
|
- public function websiteCategory()
|
|
|
+ public function category()
|
|
|
{
|
|
|
- return $this->belongsTo(WebsiteCategory::class, 'catid', 'category_id');
|
|
|
+ return $this->belongsTo(Category::class, 'catid', 'id');
|
|
|
}
|
|
|
/**
|
|
|
* 定义与分类的多对一关系
|