1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <?php
- namespace App\Admin\Actions\Users;
- use App\Models\UserInfoModel;
- use Dcat\Admin\Admin;
- use Dcat\Admin\Grid\RowAction;
- use Dcat\Admin\Widgets\Modal;
- use Dcat\Admin\Widgets\Table;
- class SetUserInfo extends RowAction
- {
- protected $title = '<i class="feather icon-settings"></i>设置资料';
- protected $model;
- public function href(): string
- {
- // parent::href(); // TODO: Change the autogenerated stub
- return "/admin/users_info/".$this->getKey().'/edit';
- }
- 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()
- {
- // return $this->response()
- // ->success('Processed successfully: '.$this->getKey())
- // ->redirect('/');
- }
- /**
- * 设置要POST到接口的数据
- *
- * @return array
- */
- public function parameters()
- {
- return [];
- }
- // public function render()
- // {
- // $form = UsersInfoForm::make()->payload(['user_id'=>$this->getKey()]);
- // return Modal::make()
- // ->lg()
- // ->title($this->title)
- // ->body($form)
- // ->button('<i class="feather icon-settings"></i> '.$this->title);
- // }
- }
|