z-song/laravel-admin · error · Exception
Can only define one of the methods in `form` and `dialog`
Error message
Can only define one of the methods in `form` and `dialog`
What it means
Error "Can only define one of the methods in `form` and `dialog`" thrown in z-song/laravel-admin.
Source
Thrown at src/Actions/Action.php:111
{
$this->initInteractor();
}
/**
* @throws \Exception
*/
protected function initInteractor()
{
if ($hasForm = method_exists($this, 'form')) {
$this->interactor = new Interactor\Form($this);
}
if ($hasDialog = method_exists($this, 'dialog')) {
$this->interactor = new Interactor\Dialog($this);
}
if ($hasForm && $hasDialog) {
throw new \Exception('Can only define one of the methods in `form` and `dialog`');
}
}
/**
* Get batch action title.
*
* @return string
*/
public function name()
{
return $this->name;
}
/**
* @param string $prefix
*
* @return mixed|string
*/View on GitHub (pinned to 67c441eb78)
When it happens
Trigger: Thrown at src/Actions/Action.php:111 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of z-song/laravel-admin@67c441eb78 (2026-08-21).
Data as JSON: /api/errors/520dac8bc25f10c6.
Report an issue: GitHub.