ActionLogController.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | LARAVEL8.0 框架 [ LARAVEL ][ RXThinkCMF ]
  4. // +----------------------------------------------------------------------
  5. // | 版权所有 2017~2021 LARAVEL研发中心
  6. // +----------------------------------------------------------------------
  7. // | 官方网站: http://www.laravel.cn
  8. // +----------------------------------------------------------------------
  9. // | Author: laravel开发员 <laravel.qq.com>
  10. // +----------------------------------------------------------------------
  11. namespace App\Http\Controllers\Admin;
  12. use App\Services\Common\ActionLogService;
  13. /**
  14. * 行为日志-控制器
  15. * @author laravel开发员
  16. * @since 2020/11/12
  17. * Class ActionLogController
  18. * @package App\Http\Controllers
  19. */
  20. class ActionLogController extends Backend
  21. {
  22. /**
  23. * 构造函数
  24. * @author laravel开发员
  25. * @since 2020/11/12
  26. * ActionLogController constructor.
  27. */
  28. public function __construct()
  29. {
  30. parent::__construct();
  31. $this->service = new ActionLogService();
  32. }
  33. public function index()
  34. {
  35. $username = '';
  36. if($this->userInfo['user_type'] == 2){
  37. $username = $this->userInfo['username'];
  38. }
  39. request()->merge(['username'=> $username]);
  40. $result = $this->service->getList();
  41. return $result;
  42. }
  43. }