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:
19
app/Actions/GetPathFromVaultNode.php
Normal file
19
app/Actions/GetPathFromVaultNode.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions;
|
||||
|
||||
use App\Models\VaultNode;
|
||||
|
||||
class GetPathFromVaultNode
|
||||
{
|
||||
public function handle(VaultNode $node): string
|
||||
{
|
||||
$path =
|
||||
'vaults' . DIRECTORY_SEPARATOR .
|
||||
auth()->user()->id . DIRECTORY_SEPARATOR .
|
||||
$node->vault_id . DIRECTORY_SEPARATOR .
|
||||
$node->id . '.' . $node->extension;
|
||||
|
||||
return $path;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user