server->services()->where('id', $id)->firstOrFail(); $service->stop(); $this->refreshComponent([]); } public function start(int $id): void { /** @var Service $service */ $service = $this->server->services()->where('id', $id)->firstOrFail(); $service->start(); $this->refreshComponent([]); } public function restart(int $id): void { /** @var Service $service */ $service = $this->server->services()->where('id', $id)->firstOrFail(); $service->restart(); $this->refreshComponent([]); } public function uninstall(int $id): void { /** @var Service $service */ $service = $this->server->services()->where('id', $id)->firstOrFail(); $service->uninstall(); $this->refreshComponent([]); } public function render(): View { return view('livewire.services.services-list', [ 'services' => $this->server->services, ]); } }