Stuff
This commit is contained in:
parent
a40a9a523e
commit
6230f7e836
1 changed files with 8 additions and 3 deletions
|
@ -32,10 +32,15 @@ class Gallery extends JsonResource
|
|||
]];
|
||||
$data["description"] = $this->description;
|
||||
$t = json_decode($this->tags);
|
||||
foreach ($t as $i => $g) {
|
||||
$t[$i] = trim($g);
|
||||
if(is_array($t)) {
|
||||
foreach ($t as $i => $g) {
|
||||
$t[$i] = trim($g);
|
||||
}
|
||||
$data["tags"] = $t;
|
||||
} else {
|
||||
$data["tags"] = null;
|
||||
}
|
||||
$data["tags"] = $t;
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue