src/TelegramTemplateCompiler.php
protected function compileKeyboard(Keyboard $keyboard)
    {
        $firstButton = collect($keyboard->getButtons())->first();

        if ($firstButton instanceof PayloadButton || $firstButton instanceof UrlButton) {
            return $this->compileInlineKeyboard($keyboard);
        }

        return $this->compileReplyKeyboard($keyboard);
    }
protected function compileKeyboard(Keyboard $keyboard)
    {
        $firstButton = collect($keyboard->getButtons())->first();

        if ($firstButton instanceof PayloadButton || $firstButton instanceof UrlButton) {
            return $this->compileInlineKeyboard($keyboard);
        }

        return $this->compileReplyKeyboard($keyboard);
    }
protected function compileKeyboard ( Keyboard $ keyboard ) { $ firstButton = collect ( $ keyboard -> getButtons ( ) ) -> first ( ) ; if ( $ firstButton instanceof PayloadButton || $ firstButton instanceof UrlButton ) { return $ this -> compileInlineKeyboard ( $ keyboard ) ; } return $ this -> compileReplyKeyboard ( $ keyboard ) ; }
Compile keyboard.

@param Keyboard $keyboard

@return mixed
Compile keyboard .