src/Messages/Button.php
private function makePayload()
    {
        $payload = [];
        switch ($this->type) {
            case self::TYPE_POSTBACK:
            case self::TYPE_CALL:
                $payload = ['payload' => $this->payload];
                break;
            case self::TYPE_WEB:
                $payload = ['url' => $this->payload];
                break;
            default:
                throw new UnknownTypeException;
        }

        return array_merge($payload, $this->extra);
    }
private function makePayload()
    {
        $payload = [];
        switch ($this->type) {
            case self::TYPE_POSTBACK:
            case self::TYPE_CALL:
                $payload = ['payload' => $this->payload];
                break;
            case self::TYPE_WEB:
                $payload = ['url' => $this->payload];
                break;
            default:
                throw new UnknownTypeException;
        }

        return array_merge($payload, $this->extra);
    }
private function makePayload ( ) { $ payload = [ ] ; switch ( $ this -> type ) { case self :: TYPE_POSTBACK : case self :: TYPE_CALL : $ payload = [ 'payload' => $ this -> payload ] ; break ; case self :: TYPE_WEB : $ payload = [ 'url' => $ this -> payload ] ; break ; default : throw new UnknownTypeException ; } return array_merge ( $ payload , $ this -> extra ) ; }
Make payload by type

@return array
@throws \Casperlaitw\LaravelFbMessenger\Exceptions\UnknownTypeException
Make payload by type