From 665f55ece8853c1ed2e7b33c5b23fa599c0920a9 Mon Sep 17 00:00:00 2001 From: Supun Dulara Date: Tue, 15 Oct 2024 20:09:18 +0530 Subject: [PATCH] small change in TaxonomyTermController --- app/Http/Controllers/Backend/TaxonomyTermController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Backend/TaxonomyTermController.php b/app/Http/Controllers/Backend/TaxonomyTermController.php index dce6913..7619211 100644 --- a/app/Http/Controllers/Backend/TaxonomyTermController.php +++ b/app/Http/Controllers/Backend/TaxonomyTermController.php @@ -42,7 +42,7 @@ public function store(Request $request, Taxonomy $taxonomy,TaxonomyTerm $taxonom { try { $validatedData = $request->validate([ - 'code' => 'required', + 'code' => 'required|unique:taxonomy_terms,code', 'name' => 'required', 'taxonomy_id' => 'required|exists:taxonomies,id', 'parent_id' => 'nullable|exists:taxonomy_terms,id',