2024-01-07 15:23:41 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Livewire\Project;
|
|
|
|
|
2024-03-22 10:34:15 +00:00
|
|
|
use App\Models\PrivateKey;
|
2024-01-07 15:23:41 +00:00
|
|
|
use App\Models\Project;
|
|
|
|
use App\Models\Server;
|
|
|
|
use Livewire\Component;
|
|
|
|
|
|
|
|
class Index extends Component
|
|
|
|
{
|
|
|
|
public $projects;
|
|
|
|
public $servers;
|
2024-03-22 10:34:15 +00:00
|
|
|
public $private_keys;
|
2024-01-07 15:23:41 +00:00
|
|
|
public function mount() {
|
2024-03-22 10:34:15 +00:00
|
|
|
$this->private_keys = PrivateKey::ownedByCurrentTeam()->get();
|
2024-01-07 15:23:41 +00:00
|
|
|
$this->projects = Project::ownedByCurrentTeam()->get();
|
|
|
|
$this->servers = Server::ownedByCurrentTeam()->count();
|
|
|
|
}
|
|
|
|
public function render()
|
|
|
|
{
|
|
|
|
return view('livewire.project.index');
|
|
|
|
}
|
|
|
|
}
|