{"record":{"id":"520dac8bc25f10c6","repo":"z-song/laravel-admin","slug":"can-only-define-one-of-the-methods-in-form-and","errorCode":null,"errorMessage":"Can only define one of the methods in `form` and `dialog`","messagePattern":"Can only define one of the methods in `form` and `dialog`","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/Actions/Action.php","lineNumber":111,"sourceCode":"    {\n        $this->initInteractor();\n    }\n\n    /**\n     * @throws \\Exception\n     */\n    protected function initInteractor()\n    {\n        if ($hasForm = method_exists($this, 'form')) {\n            $this->interactor = new Interactor\\Form($this);\n        }\n\n        if ($hasDialog = method_exists($this, 'dialog')) {\n            $this->interactor = new Interactor\\Dialog($this);\n        }\n\n        if ($hasForm && $hasDialog) {\n            throw new \\Exception('Can only define one of the methods in `form` and `dialog`');\n        }\n    }\n\n    /**\n     * Get batch action title.\n     *\n     * @return string\n     */\n    public function name()\n    {\n        return $this->name;\n    }\n\n    /**\n     * @param string $prefix\n     *\n     * @return mixed|string\n     */","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/z-song/laravel-admin/blob/67c441eb78ecc5437e59775d89770cd9c2cb1e05/src/Actions/Action.php#L93-L129","documentation":"Error \"Can only define one of the methods in `form` and `dialog`\" thrown in z-song/laravel-admin.","triggerScenarios":"Thrown at src/Actions/Action.php:111 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"67c441eb78ecc5437e59775d89770cd9c2cb1e05","analyzedAt":"2026-08-21T02:51:03.143Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}