PHPackages                             al3x5/xbot-laravel - 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. [Framework](/categories/framework)
4. /
5. al3x5/xbot-laravel

ActiveLibrary[Framework](/categories/framework)

al3x5/xbot-laravel
==================

Laravel integration for xBot library

v0.1.1(5mo ago)020MITPHPPHP ^8.2

Since Dec 11Pushed 2mo agoCompare

[ Source](https://github.com/al3x5dev/xbot-laravel)[ Packagist](https://packagist.org/packages/al3x5/xbot-laravel)[ RSS](/packages/al3x5-xbot-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (4)Used By (0)

xBot Laravel
============

[](#xbot-laravel)

Seamless integration of [xBot](https://github.com/al3x5dev/xbot/) the powerful PHP library for creating Telegram bots with the [Laravel framework](https://github.com/laravel/laravel).

🚀 Features
----------

[](#-features)

- **Artisan Commands**: Use xBot through familiar Laravel commands
- **Laravel Cache Integration**: Automatic PSR-16 adapter
- **Laravel Configuration**: Native Laravel configuration system
- **API Ready**: Automatic Laravel Sanctum configuration
- **Webhook Management**: Easy webhook configuration for Telegram bots

📦 Installation
--------------

[](#-installation)

```
composer require al3x5/xbot-laravel
```

⚡ Quick Start
-------------

[](#-quick-start)

### 1. Install and Configure

[](#1-install-and-configure)

```
php artisan xbot
```

This command will:

- Configure the Laravel API (Sanctum)
- Publish the xBot configuration
- Guide you through setting up your bot
- Adapt the configuration for your environment Laravel

### 2. Configure Webhook

[](#2-configure-webhook)

```
php artisan xbot:hook:set https://yourdomain.com/xbot/webhook
```

### 3. Create Your First Command

[](#3-create-your-first-command)

```
php artisan xbot telegram:command HelloWorld
```

### 4. Register all commands and callbacks

[](#4-register-all-commands-and-callbacks)

```
php artisan xbot register
```

🛠 Available Commands
--------------------

[](#-available-commands)

All commands available in [xBot](https://github.com/al3x5dev/xbot/blob/main/docs/cli.md), except `php vendor/bin/xbot install`. This command is replaced by `php artisan xbot`.

⚙️ Settings
-----------

[](#️-settings)

After installation, add to your `.env`:

```
BOT_TOKEN=1234567890:ABCDEFGHIJKLMNOQRSTZ
ADMIN_TELEGRAM_ID=123456789,985632147

```

🌐 Webhook Route
---------------

[](#-webhook-route)

Add to your `routes/api.php`:

```
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

Route::post('/bot', function (Request $request) {
    $bot = new Al3x5\xBot\Bot(config('xbot'));
    $bot->run();
});
```

🔧 Advanced Use
--------------

[](#-advanced-use)

### Custom Integration

[](#custom-integration)

Inject xBot services into your controllers:

```
use H3x5\xBot\Bot;

public function sayHelloWorld(Request $request, Bot $bot)
{
    return $bot->sendMessage([
        'chat_id' => 'CHAT_ID',
        'text' => 'Hello World'
        ]);
}
```

📚 Requirements
--------------

[](#-requirements)

- PHP 8.2+
- Laravel 12.x
- xBot Library (automatically installed)

🆘 Support
---------

[](#-support)

- [Documentation](https://github.com/al3x5dev/xbot/tree/main/docs)
- [Issues](https://github.com/al3x5/xbot-laravel/issues)

📄 License
---------

[](#-license)

MIT License - see the [LICENSE](LICENSE) file for details.

---

**Need help?** Open an issue on GitHub or consult the xBot documentation.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance79

Regular maintenance activity

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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

Every ~0 days

Total

2

Last Release

153d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ee7388f72cf6dfb30d963374d1faf32cdc320751d19c0dc0ce752a55179d1eb3?d=identicon)[Al3x5](/maintainers/Al3x5)

---

Top Contributors

[![al3x5dev](https://avatars.githubusercontent.com/u/139165436?v=4)](https://github.com/al3x5dev "al3x5dev (24 commits)")

### Embed Badge

![Health badge](/badges/al3x5-xbot-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/al3x5-xbot-laravel/health.svg)](https://phpackages.com/packages/al3x5-xbot-laravel)
```

###  Alternatives

[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3691.5k](/packages/codewithdennis-larament)[ecotone/laravel

Laravel integration for Ecotone

21307.6k3](/packages/ecotone-laravel)

PHPackages © 2026

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