fix: add svg format

This commit is contained in:
2026-06-06 16:38:01 +03:30
parent 9080cf866e
commit 835cba22ed
7 changed files with 17 additions and 14 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ public function store(Request $request)
$data = $request->validate([
'name' => 'required|string|max:255|unique:categories,name',
'description' => 'nullable|string',
'icon' => 'nullable|image|max:8192',
'icon' => 'nullable|file|extensions:jpg,jpeg,png,gif,webp,bmp,svg|max:8192',
]);
$category = Category::create([
@@ -60,7 +60,7 @@ public function update(Request $request, $id)
$data = $request->validate([
'name' => 'sometimes|string|max:255|unique:categories,name,' . $category->id,
'description' => 'nullable|string',
'icon' => 'nullable|image|max:8192',
'icon' => 'nullable|file|extensions:jpg,jpeg,png,gif,webp,bmp,svg|max:8192',
]);
if (array_key_exists('name', $data)) {