{"id":37014770,"url":"https://github.com/madmagestelegram/laravel-client","last_synced_at":"2026-01-14T01:28:44.000Z","repository":{"id":62521669,"uuid":"288511822","full_name":"madmagestelegram/laravel-client","owner":"madmagestelegram","description":"Telegram + Laravel integration","archived":false,"fork":false,"pushed_at":"2023-05-10T22:58:49.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-24T21:54:21.308Z","etag":null,"topics":["laravel","telegram"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/madmagestelegram.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-18T16:48:37.000Z","updated_at":"2023-05-10T22:55:51.000Z","dependencies_parsed_at":"2022-11-02T13:32:37.943Z","dependency_job_id":null,"html_url":"https://github.com/madmagestelegram/laravel-client","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/madmagestelegram/laravel-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madmagestelegram%2Flaravel-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madmagestelegram%2Flaravel-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madmagestelegram%2Flaravel-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madmagestelegram%2Flaravel-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madmagestelegram","download_url":"https://codeload.github.com/madmagestelegram/laravel-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madmagestelegram%2Flaravel-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28407989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T00:40:43.272Z","status":"ssl_error","status_checked_at":"2026-01-14T00:40:42.636Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","telegram"],"created_at":"2026-01-14T01:28:43.257Z","updated_at":"2026-01-14T01:28:43.992Z","avatar_url":"https://github.com/madmagestelegram.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegram + Laravel\n\nLaravel + telegram integration. Based on [telegram bot types](https://github.com/madmagestelegram/Types)\n\n# Install\n`composer require madmagestelegram/laravel`\n\n# Concepts\n### Main concept\nThe main concept is creating handlers for incoming updates from telegram.\n\nIt should implement [abstract handler](https://github.com/madmagestelegram/laravel-client/blob/master/src/Handler/AbstractHandler.php)\n\n### Examples of handlers\nThere is one build in [handler for telegram commands](https://github.com/madmagestelegram/laravel-client/blob/master/src/Handler/Command/CommandHandler.php)\n\n### Service provider\nTo define custom handlers or telegram-command-handler, it necessary to create and register own service provider and extend it from `\\MadmagesTelegram\\Laravel\\HandlerServiceProvider` \n```php\n\u003c?php \ndeclare(strict_types=1);\n\nnamespace App\\Providers;\n\nclass TelegramServiceProvider extends \\MadmagesTelegram\\Laravel\\HandlerServiceProvider\n{\n\n    /** @var array Handlers for telegram commands */\n    protected array $telegramCommands = [];\n\n    // Other handlers\n    protected array $messageHandlers = [\n        // This handler is for telegram-commands,\n        // i.e. it makes $this-\u003etelegramCommands working\n        \\MadmagesTelegram\\Laravel\\Handler\\Command\\CommandHandler::class\n    ];\n    protected array $editMessageHandlers = [];\n    protected array $channelPostHandlers = [];\n    protected array $editedChannelPostHandlers = [];\n    protected array $inlineQueryHandlers = [];\n    protected array $chosenInlineResultHandlers = [];\n    protected array $callbackQueryHandlers = [];\n    protected array $preCheckoutQueryHandlers = [];\n    protected array $shippingQueryHandlers = [];\n    protected array $pollAnswerHandlers = [];\n    protected array $pollHandlers = [];\n}\n\n```\n\n### Command handler\nThe command handler built for handling telegram commands i.e. **/start** for example.\n\nAll commands should implement [AbstractCommand](https://github.com/madmagestelegram/laravel-client/blob/master/src/Handler/Command/AbstractCommand.php)\nand should be defined in `\\MadmagesTelegram\\Laravel\\HandlerServiceProvider::$telegramCommands` of own service provider\n\n```php\n\u003c?php declare(strict_types=1);\n\nnamespace App\\Module\\Telegram\\Command;\n\nuse MadmagesTelegram\\Laravel\\Handler\\Command\\AbstractCommand;\nuse MadmagesTelegram\\Laravel\\WebhookClient;\nuse MadmagesTelegram\\Types\\Type\\Message;\nuse Illuminate\\Http\\JsonResponse;\n\nclass Start extends AbstractCommand\n{\n\n    private WebhookClient $client;\n\n    public function __construct(WebhookClient $client)\n    {\n        // It possible to response, during webhook request \n        // https://core.telegram.org/bots/api#making-requests-when-getting-updates\n        $this-\u003eclient = $client;\n    }\n    \n     public function getName(): string\n    {\n        return 'start';\n    }\n\n    public function execute(Message $message, bool $isPrivate): ?JsonResponse\n    {\n        return $this-\u003eclient-\u003esendMessage($message-\u003egetChat()-\u003egetId(), 'Hello there !');\n    }\n}\n```\n\nand register it \n```php\n\u003c?php \ndeclare(strict_types=1);\n\nnamespace App\\Providers;\n\nclass TelegramServiceProvider extends \\MadmagesTelegram\\Laravel\\HandlerServiceProvider\n{\n    protected array $telegramCommands = [\n        \\App\\Module\\Telegram\\Command\\Start::class\n    ];\n}\n\n```\n\n# Laravel commands\n`madmagestelegram:registerWebhook` - register webhook in telegram. It makes all handlers to work","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadmagestelegram%2Flaravel-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadmagestelegram%2Flaravel-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadmagestelegram%2Flaravel-client/lists"}