payload(["id"=>$this->getKey()]); return Modal::make() ->lg() ->title($this->title) ->body($form) // 因为此处使用了表单异步加载功能,所以一定要用 onLoad 方法 // 如果是非异步方式加载表单,则需要改成 onShow 方法 ->button($this->title); } /** * Handle the action request. * * @param Request $request * * @return Response */ public function handle(Request $request) { // dump($this->getKey()); return $this->response() ->success('Processed successfully: '.$this->getKey()) ->redirect('/'); } /** * @return string|array|void */ public function confirm() { // return ['Confirm?', 'contents']; } /** * @param Model|Authenticatable|HasPermissions|null $user * * @return bool */ protected function authorize($user): bool { return true; } /** * @return array */ protected function parameters() { return []; } }