mirror of
https://github.com/brufdev/many-notes.git
synced 2026-01-25 12:28:58 -06:00
Add Vault show page
Add VaultNode CRUD features Add VaultNode search feature Add TreeView component
This commit is contained in:
18
app/Actions/ResolveTwoPaths.php
Normal file
18
app/Actions/ResolveTwoPaths.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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, '/');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user