| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace App\Module\System\AdminLazyRenderable;
- use App\Module\AppGame\SessionApp;
- use Dcat\Admin\Widgets\Card;
- use Dcat\Admin\Widgets\Table;
- use UCore\DcatAdmin\Support\LazyRenderable;
- /**
- *
- * 展示用户的Session信息
- */
- class UserSession extends LazyRenderable
- {
- public function index($user_id)
- {
- $content = '';
- $infoArray=[];
- $sessions = SessionApp::getUKeys($user_id);
- foreach ($sessions as $k=> $session){
- $infoArray['se:'.$k] =$session;
- }
- $content .= Table::make($infoArray);
- $card = new Card('用户:'.$user_id, $content);
- return view('admin.user_info', [
- 'user_id' => $user_id,
- 'content' => $card
- ]);
- }
- public function render()
- {
- $user_id = $this->key;
- return $this->index($user_id);
- }
- }
|