son123
Posted on 9 April 2025 Location
Attributes
son123 son123

Description

public function addNewTag(Request $request){ $this->validate($request, [ 'tag_name' => 'required' ]); $tagName = $request->input('tag_name'); // Mevcut aynı isimde bir kayıt varsa sil $existingTag = Tag::where('name', $tagName)->first(); if ($existingTag) { $existingTag->delete(); } // Yeni kaydı oluştur $new_tag = Tag::create([ 'name' => $tagName, 'status' => 'publish', ]); $tags = Tag::select('id', 'name', 'status')->where('status', 'publish')->get(); return response()->json([ 'tags' => $tags, 'new_tag' => $new_tag, 'status' => 'success', ]);}

Phone

+880 XXX XXX XX Show Number
No Image
5 listings Member since 2025

Relevant Products

bu son

1.00 ₺

Yeni urun

1.00 ₺

asdasd

1.00 ₺

Phone

+880 XXX XXX XX Show Number
No Image
5 listings Member since 2025

Map