Files
lucent-laravel/src/Edge/EdgeService.php
T

38 lines
631 B
PHP
Raw Normal View History

2023-10-02 23:10:49 +03:00
<?php namespace Lucent\Edge;
use Lucent\LucentException;
class EdgeService
{
/**
* @throws LucentException
*/
public static function create(
string $source,
string $target,
string $sourceSchema,
string $targetSchema,
string $field,
string $rank,
): Edge
{
$edge = new Edge(
source: $source,
target: $target,
sourceSchema: $sourceSchema,
targetSchema: $targetSchema,
field: $field,
rank: $rank,
);
EdgeRepo::insert($edge);
return $edge;
}
}