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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel

LaravelTelegramBot

Latest Version on Packagist Total Downloads

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

PHP Build Version
Package Version
Requires illuminate/support Version ~7|~8|~9|~10
longman/telegram-bot Version ^0.81
ext-pcntl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package php-telegram-bot/laravel contains the following files

Loading the files please wait ....