lasthourcloud/app/Http/Livewire/Project/Database/Heading.php
2023-08-07 18:46:40 +02:00

23 lines
575 B
PHP

<?php
namespace App\Http\Livewire\Project\Database;
use Livewire\Component;
use App\Actions\Database\StartPostgresql;
class Heading extends Component
{
public $database;
public array $parameters;
public function mount()
{
$this->parameters = getRouteParameters();
}
public function start() {
if ($this->database->type() === 'postgresql') {
$activity = resolve(StartPostgresql::class)($this->database->destination->server, $this->database);
$this->emit('newMonitorActivity', $activity->id);
}
}
}