site = $site; $this->version = $version; } public function handle(): void { $this->site->php_version = $this->version; $this->site->server->webserver()->handler()->changePHPVersion($this->site, $this->version); $this->site->save(); event( new Broadcast('change-site-php-finished', [ 'id' => $this->site->id, 'php_version' => $this->site->php_version, ]) ); } public function failed(): void { event( new Broadcast('change-site-php-failed', [ 'message' => __('Failed to change PHP!'), 'id' => $this->site->id, ]) ); } }