hasMany(Product::class, 'category_id'); } /** * Get the translations for the category name. */ public function translations() { return $this->hasMany(\App\Models\System\Translation::class, 'key', 'name_dictionary_key') ->where('group', 'category'); } }