1- # Telegram Bot Package for Laravel 5 .x
1+ # Telegram Bot Package for Laravel 6 .x
22
33[ ![ Build Status] ( https://travis-ci.org/php-telegram-bot/laravel.svg?branch=master )] ( https://travis-ci.org/php-telegram-bot/laravel )
44[ ![ Code Coverage] ( https://img.shields.io/scrutinizer/coverage/g/php-telegram-bot/laravel/master.svg?style=flat-square )] ( https://scrutinizer-ci.com/g/php-telegram-bot/laravel/?b=master )
@@ -42,18 +42,10 @@ And run composer update
4242
4343 composer require php-telegram-bot/laravel
4444
45- In Laravel 5.5 the service provider will automatically get registered.
46- In older versions of the framework just add the service provider in ` config/app.php ` file:
47-
48- ``` php
49- PhpTelegramBot\Laravel\PhpTelegramBotServiceProvider::class,
50- ```
51-
5245Copy the package config and migrations to your project with the publish command:
5346
5447 php artisan vendor:publish --provider="PhpTelegramBot\Laravel\PhpTelegramBotServiceProvider"
5548
56-
5749After run migration command
5850
5951 php artisan migrate
@@ -74,16 +66,17 @@ use PhpTelegramBot\Laravel\PhpTelegramBotContract;
7466
7567class CustomController extends Controller
7668{
77- public function handle(PhpTelegramBotContract $telegram_bot )
69+ public function handle(PhpTelegramBotContract $telegramBot )
7870 {
7971 // Call handle method
80- $telegram_bot ->handle();
72+ $telegramBot ->handle();
8173
8274 // Or set webhook
83- $telegram_bot->setWebhook($hook_url);
75+ $hookUrl = 'https://hook.url';
76+ $telegramBot->setWebhook($hookUrl);
8477
8578 // Or handle telegram getUpdates request
86- $telegram_bot ->handleGetUpdates();
79+ $telegramBot ->handleGetUpdates();
8780 }
8881}
8982
0 commit comments