mirror of
https://github.com/brufdev/many-notes.git
synced 2026-05-16 15:18:25 -05:00
b2b86fe513
Add VaultNode CRUD features Add VaultNode search feature Add TreeView component
19 lines
404 B
PHP
19 lines
404 B
PHP
<?php
|
|
|
|
namespace App\Actions;
|
|
|
|
use GuzzleHttp\Psr7\Utils;
|
|
use Illuminate\Support\Str;
|
|
use GuzzleHttp\Psr7\UriResolver;
|
|
|
|
class ResolveTwoPaths
|
|
{
|
|
public function handle(string $currentPath, string $path): string
|
|
{
|
|
$uri = Utils::uriFor(trim($path));
|
|
$resolvedUri = UriResolver::resolve(Utils::uriFor(trim($currentPath)), $uri);
|
|
|
|
return Str::ltrim($resolvedUri, '/');
|
|
}
|
|
}
|