} $action */ public function action(string|array $action): static { if (is_array($action)) { $fn = array_shift($action); $params = collect($action)->map( fn ($v) => match (strtolower(gettype($v))) { 'string' => "'{$v}'", 'boolean' => $v ? 'true' : 'false', 'null' => 'null', default => (string) $v, } )->join(', '); $this->action = "{$fn}({$params})"; } else { $this->action = $action; } return $this; } }