belongsTo(BlogCategory::class, 'category_id'); } public function scopeActive($query){ return $query->where('status',1); } }