PHPackages                             cloud-castle/laravel-telegram-bot - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. cloud-castle/laravel-telegram-bot

ActiveLibrary[API Development](/categories/api)

cloud-castle/laravel-telegram-bot
=================================

Integrates PHP Telegram Bot into LaravelTelegramBot.

1.0.0.1(2y ago)03MITPHP

Since Sep 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/zorinalexey/laravel-telegram-bot)[ Packagist](https://packagist.org/packages/cloud-castle/laravel-telegram-bot)[ RSS](/packages/cloud-castle-laravel-telegram-bot/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

LaravelTelegramBot
==================

[](#laraveltelegrambot)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7925753ef59dbf7f7a9216e497494d05c633966d0214f78ba4b6646462791054/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636c6f75642d636173746c652f636c6f75642d636173746c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cloud-castle/cloud-castle)[![Total Downloads](https://camo.githubusercontent.com/839f3d638acebcf44d2ea51caefd4ae4ff053c52cbfad599047d5a72f6b43f1f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636c6f75642d636173746c652f636c6f75642d636173746c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cloud-castle/cloud-castle)

Installation
------------

[](#installation)

Install this package through Composer. Run this command in your project's terminal:

```
composer require cloud-castle/cloud-castle
```

Execute the following command to publish the folder structure to your LaravelTelegramBot application:

```
php artisan telegram:publish
```

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:

```
php artisan migrate
```

And add the following lines to your .env file:

```
TELEGRAM_API_TOKEN=
TELEGRAM_BOT_USERNAME=
TELEGRAM_API_URL=
TELEGRAM_ADMINS=
```

`TELEGRAM_API_TOKEN` and `TELEGRAM_BOT_USERNAME` should be filled with the corresponding data from [@BotFather](https://t.me/BotFather)

`TELEGRAM_API_URL` is optional and can be filled with the URL to your [custom Bot API Server](https://core.telegram.org/bots/api#using-a-local-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
-----

[](#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):

```
# Use this method to specify a url and receive incoming updates via an outgoing webhook
php artisan telegram:set-webhook
# List of available options:
# --d|drop-pending-updates : Drop all pending updates
# --a|all-update-types : Explicitly allow all updates (including "chat_member")
# --allowed-updates= : Define allowed updates (comma-seperated)

# Use this method to remove webhook integration if you decide to switch back to getUpdates
php artisan telegram:delete-webhook
# List of available options:
# --d|drop-pending-updates : Pass to drop all pending updates
```

Artisan terminal commands for the Telegram getUpdates method:

```
# Fetches Telegram updates periodically
php artisan telegram:fetch
# List of available options:
# --a|all-update-types : Explicitly allow all updates (including "chat_member")
# --allowed-updates= : Define allowed updates (comma-seperated)
```

Artisan terminal command for Telegram Server logging out:

```
# Sends a logout to the currently registered Telegram Server
php artisan telegram:logout
```

Artisan terminal command for closing Telegram Server:

```
# Sends a close to the currently registered Telegram Server
php artisan telegram:close
```

Artisan terminal command for publishing Telegram command folder structure in your project:

```
# Publishes folder structure for Telegram Commands
# Default StartCommand class will be created
php artisan telegram:publish
```

Artisan terminal command for creating new Telegram command class in your project:

```
# Create a new Telegram Bot Command class
# e.g. php artisan make:telegram-command Menu --> will make User command class MenuCommand
# e.g. php artisan make:telegram-command Genericmessage --system --> will make System command class GenericmessageCommand
php artisan make:telegram-command
# List of available options:
# name : Name of the Telegram Command
# --a|admin : Generate a AdminCommand
# --s|system : Generate a SystemCommand
# Without admin or system option default User command will be created
```

Credits
-------

[](#credits)

- [Avtandil Kikabidze aka LONGMAN](https://github.com/akalongman)
- [TiiFuchs](https://github.com/TiiFuchs)
- [All Contributors](https://github.com/cloud-castle/cloud-castle/contributors)

License
-------

[](#license)

Please see the [license file](license.md) for more information.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

975d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/006faf20fd75069a22069898f0bb1983a85731fc0c55b41c41d7d0ae0c80ae96?d=identicon)[zorinalexey](/maintainers/zorinalexey)

---

Top Contributors

[![zorinalexey](https://avatars.githubusercontent.com/u/74205167?v=4)](https://github.com/zorinalexey "zorinalexey (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cloud-castle-laravel-telegram-bot/health.svg)

```
[![Health](https://phpackages.com/badges/cloud-castle-laravel-telegram-bot/health.svg)](https://phpackages.com/packages/cloud-castle-laravel-telegram-bot)
```

###  Alternatives

[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[mll-lab/laravel-graphiql

Easily integrate GraphiQL into your Laravel project

683.2M9](/packages/mll-lab-laravel-graphiql)[esign/laravel-conversions-api

A laravel wrapper package around the Facebook Conversions API

69145.4k](/packages/esign-laravel-conversions-api)[didww/didww-api-3-php-sdk

PHP SDK for DIDWW API 3

1218.2k](/packages/didww-didww-api-3-php-sdk)[surface/laravel-webfinger

A Laravel package to create an ActivityPub webfinger.

113.8k](/packages/surface-laravel-webfinger)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
