SetUserInfo.php 1.5 KB

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