hasMany(ProductSubcategory::class,'product_category_id','id')->withTrashed(); } public function products() { return $this->hasMany(Product::class,'product_category_id','id')->withTrashed(); } }