Initial commit

This commit is contained in:
xiahe93 committed 2025-02-24 12:07:54 +08:00
commit 4e80077405
9608 files changed
+3007841

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\ArticleList;
use App\Services\Time;
use voku\helper\AntiXSS;
use App\Models\Tags;
class ClientController extends Controller
{
public function singe($iCode)
{
$oAntiXss = new AntiXSS();
$iCode = $oAntiXss->xss_clean($iCode);
$aSinge = ArticleList::where("code", "=", $iCode)->first()->toArray();
$sTagsStr = $aSinge['tags'];
$sTagsStr = substr($sTagsStr, 1, -1);
$aTagsId = explode('][', $sTagsStr);
$aTagsMap = Tags::all()->toArray();
foreach ($aTagsId as $aTagsIdRow) {
$aTagsName[] = $aTagsMap[$aTagsIdRow-1];
}
return view("client/singe", [
"aSinge" => $aSinge,
'aTagNames' => $aTagsName,
'sMenu' => 'client',
]);
}
}