SetUserInfo.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. namespace App\Admin\Actions\Users;
  3. use App\Models\UserInfoModel;
  4. use Dcat\Admin\Admin;
  5. use Dcat\Admin\Grid\RowAction;
  6. use Dcat\Admin\Widgets\Modal;
  7. use Dcat\Admin\Widgets\Table;
  8. class SetUserInfo extends RowAction
  9. {
  10. protected $title = '<i class="feather icon-settings"></i>设置资料';
  11. protected $model;
  12. public function href(): string
  13. {
  14. // parent::href(); // TODO: Change the autogenerated stub
  15. return "/admin/users_info/".$this->getKey().'/edit';
  16. }
  17. public function __construct(string $model = null)
  18. {
  19. $this->model = $model;
  20. }
  21. /**
  22. * 设置确认弹窗信息,如果返回空值,则不会弹出弹窗
  23. *
  24. * 允许返回字符串或数组类型
  25. *
  26. * @return array|string|void
  27. */
  28. public function confirm()
  29. {
  30. }
  31. /**
  32. * 处理请求
  33. *
  34. * @param Request $request
  35. *
  36. * @return \Dcat\Admin\Actions\Response
  37. */
  38. public function handle()
  39. {
  40. // return $this->response()
  41. // ->success('Processed successfully: '.$this->getKey())
  42. // ->redirect('/');
  43. }
  44. /**
  45. * 设置要POST到接口的数据
  46. *
  47. * @return array
  48. */
  49. public function parameters()
  50. {
  51. return [];
  52. }
  53. // public function render()
  54. // {
  55. // $form = UsersInfoForm::make()->payload(['user_id'=>$this->getKey()]);
  56. // return Modal::make()
  57. // ->lg()
  58. // ->title($this->title)
  59. // ->body($form)
  60. // ->button('<i class="feather icon-settings"></i> '.$this->title);
  61. // }
  62. }