no message
This commit is contained in:
parent
8f0e4ceae3
commit
6d318bb109
@ -46,4 +46,28 @@ class ArticleCache extends Base {
|
||||
|
||||
return $r;
|
||||
}
|
||||
|
||||
public function show($aParam)
|
||||
{
|
||||
$xCode = $aParam["aArg"][0] ?? ":last";
|
||||
$sCode = $xCode;
|
||||
|
||||
if ($xCode == "?") {
|
||||
return "#show__[code:last]";
|
||||
}
|
||||
|
||||
if ($xCode === ":last") {
|
||||
$sCode = ModelArticleCache::orderBy("id", "desc")->first()?->code;
|
||||
}
|
||||
|
||||
$aCache = ModelArticleCache::where("code", $sCode)->get()->toArray();
|
||||
|
||||
$a = [];
|
||||
foreach ($aCache as $aCacheRow) {
|
||||
$aContent = json_decode($aCacheRow['content'], true);
|
||||
$a[] = $aContent;
|
||||
}
|
||||
|
||||
return $this->toJson($a);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user