src/Api.php
public function getWebhookUpdate($shouldEmitEvent = true)
    {
        $body = json_decode(file_get_contents('php://input'), true);

        $update = new Update($body);

        if ($shouldEmitEvent) {
            $this->emitEvent(new UpdateWasReceived($update, $this));
        }

        return $update;
    }
public function getWebhookUpdate($shouldEmitEvent = true)
    {
        $body = json_decode(file_get_contents('php://input'), true);

        $update = new Update($body);

        if ($shouldEmitEvent) {
            $this->emitEvent(new UpdateWasReceived($update, $this));
        }

        return $update;
    }
public function getWebhookUpdate ( $ shouldEmitEvent = true ) { $ body = json_decode ( file_get_contents ( 'php://input' ) , true ) ; $ update = new Update ( $ body ) ; if ( $ shouldEmitEvent ) { $ this -> emitEvent ( new UpdateWasReceived ( $ update , $ this ) ) ; } return $ update ; }
Returns a webhook update sent by Telegram.
Works only if you set a webhook.

@see setWebhook

@return Update
Returns a webhook update sent by Telegram . Works only if you set a webhook .