PHPackages                             kodeops/laravel-telegram-wrapper - 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. kodeops/laravel-telegram-wrapper

ActiveLibrary[API Development](/categories/api)

kodeops/laravel-telegram-wrapper
================================

Laravel Telegram API wrapper.

1.0.20(10mo ago)0720MITPHPPHP ^7|^8

Since Apr 8Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/kodeops/laravel-telegram-wrapper)[ Packagist](https://packagist.org/packages/kodeops/laravel-telegram-wrapper)[ Docs](https://github.com/kodeops/laravel-telegram-wrapper)[ RSS](/packages/kodeops-laravel-telegram-wrapper/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (22)Used By (0)

```
 _     _  _____  ______  _______  _____   _____  _______
 |____/  |     | |     \ |______ |     | |_____] |______
 |    \_ |_____| |_____/ |______ |_____| |       ______|

```

Laravel Telegram API Wrapper
============================

[](#laravel-telegram-api-wrapper)

This package is a wrapper for the [Telegram API](https://core.telegram.org/bots/api).

Install composer dependency
---------------------------

[](#install-composer-dependency)

`$ composer require kodeops/laravel-telegram-wrapper`

Setup logging
-------------

[](#setup-logging)

Add a new `channel` in `logging.php` config file:

```
'telegram' => [
    'driver' => 'single',
    'path' => storage_path('logs/telegram.log'),
    'level' => 'info',
],

```

Add environment settings
------------------------

[](#add-environment-settings)

These would be used by default, additionally you can pass the credentials when instantiating the object.

```
TELEGRAM_DEBUG=false
TELEGRAM_BOT_TOKEN=
TELEGRAM_CHAT_ID=

```

Usage
-----

[](#usage)

### Send a new message

[](#send-a-new-message)

```
use kodeops\LaravelTelegramWrapper\Telegram;

return (new Telegram())
    ->withMarkdown($markdown)
    ->sendMessage();

```

You can also specify the credentials (`bot_token` and `chat_id`) when instantiating the object.

```
use kodeops\LaravelTelegramWrapper\Telegram;

return (new Telegram($bot_token))
    ->chat($chat_id)
    ->withMarkdownImage($image)
    ->withKeyboard($keyboard)
    ->withMarkdown($markdown)
    ->sendMessage();

```

This produces a message with the image on top and uses the image for notification highlight.

```
use kodeops\LaravelTelegramWrapper\Telegram;

$keyboard = [
    'inline_keyboard' => [
        [
            [
                'text' => 'Text Button',
                'url' => 'https://tannhauser-gate.xyz',
            ],
        ]
    ]
];

$markdown = 'A simple *markdown* text';
$image = 'https://iibusiness.s3.eu-central-1.amazonaws.com/tannhauser/favicon.jpg';

return (new Telegram())
    ->withKeyboard($keyboard)
    ->withMarkdownCaption($markdown)
    ->sendPhoto($image);

```

Options for sending messages:

- `disableWebPagePreview()`: Disables link previews for links in this message
- `withKeyboard($keyboard)`: Sets the keyboard for a message
- `withMarkdown($markdown)`: Sets the markdown text
- `withMarkdownImage($image)`: Sets an image to the message using markdown
- `withMarkdownCaption($markdown)`: Sets a markdown text as a caption (useful in combination with `sendPhoto($image)`)

### Utils

[](#utils)

- `setMyCommands($commands)`: set bot commands
- `setWebhook($url)`: set webhooks url [More info on webhooks](https://core.telegram.org/bots/api#getting-updates)
- `getWebhookInfo()`: get webhooks info

### Additional features

[](#additional-features)

In general you can use `setParam($key, $value)` method to add parameters to the request.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance53

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

Every ~60 days

Recently: every ~290 days

Total

21

Last Release

329d ago

PHP version history (2 changes)1.0PHP ^7.1.3|^8.0

1.0.19PHP ^7|^8

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/40502810?v=4)[kodeops](/maintainers/kodeops)[@kodeops](https://github.com/kodeops)

---

Tags

pluginlaraveltelegramkodeops

### Embed Badge

![Health badge](/badges/kodeops-laravel-telegram-wrapper/health.svg)

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.5M916](/packages/statamic-cms)[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k36.4M126](/packages/darkaonline-l5-swagger)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k13.5M59](/packages/knuckleswtf-scribe)[mozex/anthropic-laravel

Laravel integration for the Anthropic API: facade, config publishing, install command, testing fakes, messages, streaming, tool use, thinking, and batches.

72287.1k1](/packages/mozex-anthropic-laravel)[yakovenko/laravel-lighthouse-graphql-multi-schema

A Laravel package that provides multi-schema support for Lighthouse GraphQL.

17112.5k](/packages/yakovenko-laravel-lighthouse-graphql-multi-schema)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

783.5k](/packages/scriptdevelop-whatsapp-manager)

PHPackages © 2026

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