src/Messages/PersistentMenuMessage.php
public function toData()
    {
        if ($this->type === Bot::TYPE_DELETE) {
            return [
                'fields' => [
                    'persistent_menu',
                ],
            ];
        }

        if ($this->type === Bot::TYPE_GET) {
            return [
                'fields' => 'persistent_menu',
            ];
        }

        return [
            'persistent_menu' => $this->menus,
        ];
    }
public function toData()
    {
        if ($this->type === Bot::TYPE_DELETE) {
            return [
                'fields' => [
                    'persistent_menu',
                ],
            ];
        }

        if ($this->type === Bot::TYPE_GET) {
            return [
                'fields' => 'persistent_menu',
            ];
        }

        return [
            'persistent_menu' => $this->menus,
        ];
    }
public function toData ( ) { if ( $ this -> type === Bot :: TYPE_DELETE ) { return [ 'fields' => [ 'persistent_menu' , ] , ] ; } if ( $ this -> type === Bot :: TYPE_GET ) { return [ 'fields' => 'persistent_menu' , ] ; } return [ 'persistent_menu' => $ this -> menus , ] ; }
Message to send
@return array
Message to send