12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- namespace App\Admin\Actions\Notice;
- use Dcat\Admin\Grid\RowAction;
- use Dcat\Admin\Widgets\Modal;
- class NoticeSend extends RowAction
- {
- protected $title = '推送用户';
- protected $model;
- public function __construct(string $model = null)
- {
- $this->model = $model;
- }
- /**
- * 设置确认弹窗信息,如果返回空值,则不会弹出弹窗
- *
- * 允许返回字符串或数组类型
- *
- * @return array|string|void
- */
- public function confirm()
- {
- }
- /**
- * 处理请求
- *
- * @param Request $request
- *
- * @return \Dcat\Admin\Actions\Response
- */
- public function handle(Request $request)
- {
- return $this->response()
- ->success('Processed successfully: '.$this->getKey())
- ->redirect('/');
- }
- /**
- * 设置要POST到接口的数据
- *
- * @return array
- */
- public function parameters()
- {
- return [];
- }
- public function render()
- {
- $form = UserCheck::make()->payload(['id'=>$this->getKey()]);
- return Modal::make()
- ->lg()
- ->title($this->title)
- ->body($form)
- ->button('<i class="feather icon-settings"></i> '.$this->title);
- }
- }
|