Download the PHP package php-telegram-bot/laravel without Composer
On this page you can find all versions of the php package php-telegram-bot/laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download php-telegram-bot/laravel
More information about php-telegram-bot/laravel
Files in php-telegram-bot/laravel
Package laravel
Short Description Integrates PHP Telegram Bot into Laravel.
License MIT
Homepage https://github.com/php-telegram-bot/laravel
Informations about the package laravel
LaravelTelegramBot
Installation
Install this package through Composer. Run this command in your project's terminal:
Execute the following command to publish the folder structure to your Laravel application:
This also includes a dummy /start
command to give you a quick start.
Since we're using the database part of php-telegram-bot you should run the migrations so the database schema gets installed:
And add the following lines to your .env file:
TELEGRAM_API_TOKEN
and TELEGRAM_BOT_USERNAME
should be filled with the corresponding data from @BotFather
TELEGRAM_API_URL
is optional and can be filled with the URL to your custom Bot API Server if you want to use one.
TELEGRAM_ADMINS
is optional and a comma-separated list of Telegram User IDs that gets passed to the enableAdmins
command of php-telegram-bot to enable admin commands for those users.
After that you can run php artisan telegram:set-webhook
if your development server is reachable from the outside or you're using a custom bot api server.
Or php artisan telegram:fetch
to start fetching your updates via polling.
⚠️ Be aware that you have to cancel and restart the telegram:fetch
command, if you change your code.
Usage
For further basic configuration of this Laravel package you do not need to create any configuration files.
Artisan terminal commands for the Webhook usage (remember, that you need an HTTPS server for it):
Artisan terminal commands for the Telegram getUpdates method:
Artisan terminal command for Telegram Server logging out:
Artisan terminal command for closing Telegram Server:
Artisan terminal command for publishing Telegram command folder structure in your project:
Artisan terminal command for creating new Telegram command class in your project:
Credits
License
Please see the license file for more information.
All versions of laravel with dependencies
longman/telegram-bot Version ^0.81
ext-pcntl Version *