defstudio / telegraph by fabio.ivona

A laravel facade to interact with Telegram Bots
84,815
627
10
Package Data
Maintainer Username: fabio.ivona
Maintainer Contact: fabio.ivona@defstudio.it (Fabio Ivona)
Package Create Date: 2021-11-19
Package Last Update: 2024-05-01
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-05-05 15:00:04
Package Statistics
Total Downloads: 84,815
Monthly Downloads: 5,830
Daily Downloads: 116
Total Stars: 627
Total Watchers: 10
Total Forks: 105
Total Open Issues: 18

Pest Laravel Expectations


Telegraph is a Laravel package for fluently interacting with Telegram Bots made by def:studio

Telegraph::message('hello world')
    ->keyboard(Keyboard::make()->buttons([
            Button::make('Delete')->action('delete')->param('id', '42'),
            Button::make('open')->url('https://test.it'),
    ]))->send();

Installation

You can install the package via composer:

composer require defstudio/telegraph

Publish and launch required migrations:

php artisan vendor:publish --tag="telegraph-migrations"
php artisan migrate

Optionally, you can publish the config and translation file with:

php artisan vendor:publish --tag="telegraph-config"
php artisan vendor:publish --tag="telegraph-translations"

Usage & Documentation

After a new bot is created and added to a chat/group/channel (as described in our documentation), the Telegraph facade can be used to easily send messages and interact with it:

Telegraph::message('this is great')->send();

An extensive documentation is available at

https://defstudio.github.io/telegraph

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently. Follow Us on Twitter for more updates about this package.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

Translators

License

The MIT License (MIT). Please see License File for more information.