TeamPhotos.php 1.6 KB

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