commands($command); } catch (DaemonConnectionException $daemonConnectionException) { throw_if($daemonConnectionException->getStatusCode() === Response::HTTP_BAD_GATEWAY, HttpException::class, Response::HTTP_BAD_GATEWAY, 'Server must be online in order to send commands.', $daemonConnectionException); throw $daemonConnectionException; } Activity::event('server:console.command')->subject($server)->property('command', $command)->log(); } }