Initial commit
This commit is contained in:
commit
4e80077405
9608 files changed
+3007841
No files matched your search
Executable
+37
@@ -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',
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user