| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace App\Module\AppGame\AdminControllers\Actions;
- use App\Module\AppGame\SessionApp;
- use UCore\DcatAdmin\RowAction;
- use UCore\DcatAdmin\RowAction2;
- use Illuminate\Http\Request;
- use UCore\DcatAdmin\RowActionHandler;
- /**
- * 取消登陆
- * 重置登陆
- */
- class ResetLogin extends RowActionHandler
- {
- protected $title ='取消登陆';
- /**
- * 处理请求
- *
- * @param Request $request
- *
- * @return \Dcat\Admin\Actions\Response
- */
- public function handle(Request $request)
- {
- // 获取当前行ID
- $user_id = $this->getKey();
- SessionApp::deleteUAll($user_id);
- return $this->response()->success("删除用户登陆成功: [{$user_id}]")->refresh();
- }
- public function confirm()
- {
- return [
- // 确认弹窗 title
- "您确定要取消这个用户的登陆么?",
- // 确认弹窗 content
- $this->row->username,
- ];
- }
- }
|