mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-20 02:27:57 +00:00
45 lines
1.0 KiB
PHP
45 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Livewire;
|
|
|
|
use App\Models\PrivateKey;
|
|
use App\Models\Project;
|
|
use App\Models\Server;
|
|
use Illuminate\Support\Collection;
|
|
use Livewire\Component;
|
|
|
|
class Dashboard extends Component
|
|
{
|
|
public Collection $projects;
|
|
|
|
public Collection $servers;
|
|
|
|
public Collection $privateKeys;
|
|
|
|
public function mount()
|
|
{
|
|
$this->privateKeys = PrivateKey::ownedByCurrentTeamCached();
|
|
$this->servers = Server::ownedByCurrentTeamCached();
|
|
$this->projects = Project::ownedByCurrentTeam()
|
|
->with(['environments:id,uuid,name,project_id'])
|
|
->withCount([
|
|
'applications',
|
|
'services',
|
|
'postgresqls',
|
|
'redis',
|
|
'keydbs',
|
|
'dragonflies',
|
|
'clickhouses',
|
|
'mongodbs',
|
|
'mysqls',
|
|
'mariadbs',
|
|
])
|
|
->get();
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return view('livewire.dashboard');
|
|
}
|
|
}
|