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;
|
$data["description"] = $this->description;
|
||||||
$t = json_decode($this->tags);
|
$t = json_decode($this->tags);
|
||||||
|
if(is_array($t)) {
|
||||||
foreach ($t as $i => $g) {
|
foreach ($t as $i => $g) {
|
||||||
$t[$i] = trim($g);
|
$t[$i] = trim($g);
|
||||||
}
|
}
|
||||||
$data["tags"] = $t;
|
$data["tags"] = $t;
|
||||||
|
} else {
|
||||||
|
$data["tags"] = null;
|
||||||
|
}
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue