Search the docs
->run()
Runs a defined SurrealQL function on the remote database.
Method Syntax
$db->run($function, $version, $params);
$function
string
$version
null
$params
array
Example
$functionA = $db->run("fn::hello_world", null, ["Tobie"]);$functionB = $db->run("fn::hello_world", "v1", ["Tobie"]);// or with named arguments$functionA = $db->run("fn::hello_world", params: ["Tobie"]);$functionB = $db->run("fn::hello_world", version: "v1", params: ["Tobie"]);
Previous
queryRaw
Next
select