Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/defstudio/telegraph

Telegraph is a Laravel package for fluently interacting with Telegram Bots
https://github.com/defstudio/telegraph

api bot laravel php sdk telegram telegram-bot

Last synced: about 2 hours ago
JSON representation

Telegraph is a Laravel package for fluently interacting with Telegram Bots

Awesome Lists containing this project

README

        

![Pest Laravel Expectations](https://banners.beyondco.de/Laravel%20Telegraph.png?theme=light&packageManager=composer+require&packageName=defstudio%2Ftelegraph&pattern=architect&style=style_1&description=Telegram+bots+made+easy&md=1&showWatermark=1&fontSize=100px&images=phone-outgoing)

Latest Version on Packagist
Tests
Code Style
Static Analysis
Total Downloads
License
Twitter Follow

---

**Telegraph** is a Laravel package for fluently interacting with Telegram Bots made by [def:studio](https://twitter.com/FabioIvona)

```php
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:

```bash
composer require defstudio/telegraph
```

Publish and launch required migrations:

```bash
php artisan vendor:publish --tag="telegraph-migrations"
```

```bash
php artisan migrate
```

Optionally, you can publish the config and translation file with:
```bash
php artisan vendor:publish --tag="telegraph-config"
```
```bash
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](https://docs.defstudio.it/telegraph/v1/quickstart/new-bot)),
the `Telegraph` facade can be used to easily send messages and interact with it:

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

An extensive documentation is available at

https://docs.defstudio.it/telegraph

## Testing

```bash
composer test
```

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. [Follow Us](https://twitter.com/FabioIvona) on Twitter for more updates about this package.

## Contributing

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

## Security Vulnerabilities

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

## Credits

- [Fabio Ivona](https://github.com/defstudio)
- [def:studio team](https://github.com/defstudio)
- [Andrea Marco Sartori](https://github.com/cerbero90) for his cool ideas
- [Alberto Pieripolli](https://github.com/trippo) Pest badge
- [Joris Drenth](https://github.com/jorisdrenth) Docs fix and upgrade
- [All Contributors](../../contributors)

## Translators

- [Tievo](https://github.com/Tievodj) Spanish
- [Andrey Helldar](https://github.com/andrey-helldar) Russian
- [Joris Drenth](https://github.com/jorisdrenth) Dutch
- [Moayed Alhagy](https://github.com/moayedalhagy) Arabic
- [Rafael](https://github.com/rjmo) Portuguese

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.