Fix tags with group name
This commit is contained in:
@@ -26,7 +26,7 @@ class TagGroups
|
||||
foreach ($items as $group) {
|
||||
$group_tags = [];
|
||||
foreach ($group->tags as $tag) {
|
||||
$group_tags[$tag->id] = $tag->name;
|
||||
$group_tags[$tag->id] = $group->name . ' - ' . $tag->name;
|
||||
}
|
||||
$tags[] = [
|
||||
'label' => $group->name,
|
||||
|
||||
@@ -15,6 +15,15 @@ class Tags
|
||||
return Tag::get()->pluck('name', 'id')->toArray();
|
||||
}
|
||||
|
||||
public static function getOptionsFullName()
|
||||
{
|
||||
$tags = Tag::with('group')->get();
|
||||
foreach ($tags as $tag) {
|
||||
$data[$tag->id] = $tag->group->name . '-' . $tag->name;
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
public static function getAll()
|
||||
{
|
||||
return Tag::orderBy('order', 'asc')->get();
|
||||
|
||||
Reference in New Issue
Block a user