Download the PHP package cloud-castle/laravel-telegram-bot without Composer
On this page you can find all versions of the php package cloud-castle/laravel-telegram-bot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cloud-castle/laravel-telegram-bot
More information about cloud-castle/laravel-telegram-bot
Files in cloud-castle/laravel-telegram-bot
Package laravel-telegram-bot
Short Description Integrates PHP Telegram Bot into LaravelTelegramBot.
License MIT
Informations about the package laravel-telegram-bot
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 LaravelTelegramBot application:
This also includes a dummy /start
command to give you a quick start.
Since we're using the database part of cloud-castle 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 cloud-castle 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 LaravelTelegramBot 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-telegram-bot with dependencies
longman/telegram-bot Version ^0.81
ext-pcntl Version *