protected function calculateRoute(array $value)
{
$router = Container::getInstance()->make('url');
$route = '';
/** @var \Illuminate\Routing\Route $routerObject */
foreach ($this->getRouterCollection($router) as $routerObject) {
if ($routerObject->getName() === $value['name']) {
$route = $routerObject->getPath();
return $this->calculateFullPath($value, $route);
}
}
if (empty($route)) {
throw new \Exception('Provided route name does not exist');
}
}