telegram-bot-sdk
telegram-bot-sdk copied to clipboard
Class 'Keyboard' not found in laravel/app/Http/Controllers/Controller.php:27
Hey guys, when i want to use inline keyboard i encounter to this error
local.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Class 'Keyboard' not found in /mydomin/laravel/app/Http/Controllers/Controller.php:27
I get webhookupdate in a controller and whole code on this controller is
<?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Telegram\Bot\Keyboard\Keyboard;
use Telegram;
class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
public function controll()
{
$update=Telegram::getWebhookUpdates();
$keyboard = Keyboard::make()
->inline()
->row(
Keyboard::inlineButton(['text' => 'Test', 'callback_data' => 'data']),
Keyboard::inlineButton(['text' => 'Btn 2', 'callback_data' => 'data_from_btn2'])
);
}
}
Can you guys tell me where is problem? using laravel 5.4
What version of the SDK are you using? Please let me know.
I am also using 2.2 and i have this error. I just changed composer to use dev-master in order to work
same problem for me , ver 2.2.0 >> keyboard folder not exist in src folder.
@miadz This is available on the development branch of this library
https://github.com/irazasyed/telegram-bot-sdk/blob/develop/src/Keyboard/Keyboard.php
@jonnywilliamson thanks .
was is fixed or not?