coolify/app/Livewire/Security/PrivateKey/Index.php

29 lines
758 B
PHP
Raw Permalink Normal View History

<?php
namespace App\Livewire\Security\PrivateKey;
use App\Models\PrivateKey;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
2024-09-23 17:51:31 +00:00
use Livewire\Component;
class Index extends Component
{
use AuthorizesRequests;
public function render()
{
2025-10-17 21:04:24 +00:00
$privateKeys = PrivateKey::ownedByCurrentTeam(['name', 'uuid', 'is_git_related', 'description', 'team_id'])->get();
return view('livewire.security.private-key.index', [
'privateKeys' => $privateKeys,
])->layout('components.layout');
}
public function cleanupUnusedKeys()
{
$this->authorize('create', PrivateKey::class);
PrivateKey::cleanupUnusedKeys();
$this->dispatch('success', 'Unused keys have been cleaned up.');
}
}