{"id":18832571,"url":"https://github.com/gjae/laravel-telegram-log","last_synced_at":"2026-05-02T01:34:50.387Z","repository":{"id":62511082,"uuid":"262889077","full_name":"gjae/laravel-telegram-log","owner":"gjae","description":"Simple log handler based on monolog for send log to telegram channel using API Bot","archived":false,"fork":false,"pushed_at":"2020-06-15T15:27:36.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-29T17:31:18.784Z","etag":null,"topics":["api-bot","botfather","laravel","logging","telegram-bots"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gjae.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-10T22:45:53.000Z","updated_at":"2020-06-15T15:27:39.000Z","dependencies_parsed_at":"2022-11-02T10:17:08.273Z","dependency_job_id":null,"html_url":"https://github.com/gjae/laravel-telegram-log","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/gjae/laravel-telegram-log","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjae%2Flaravel-telegram-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjae%2Flaravel-telegram-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjae%2Flaravel-telegram-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjae%2Flaravel-telegram-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gjae","download_url":"https://codeload.github.com/gjae/laravel-telegram-log/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjae%2Flaravel-telegram-log/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32520156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"ssl_error","status_checked_at":"2026-05-02T01:12:54.261Z","response_time":64,"last_error":"SSL_read: 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":["api-bot","botfather","laravel","logging","telegram-bots"],"created_at":"2024-11-08T01:58:15.772Z","updated_at":"2026-05-02T01:34:50.365Z","avatar_url":"https://github.com/gjae.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Installation and setup\n\n#### Installing dependency via composer\n\n```php\ncomposer require gjae/laravel-telegram-log\n```\n\nOnce you have installed this package, execute the following command at laravel command prompt:\n\n```php\nphp artisan vendor:publish --provider=\"Gjae\\TelegramLogChannel\\Providers\\TelegramChannelProvider\"\n```\n\nIt will create a file named ```config/telegram_channel.php```. It has the basic config. Now you will need to add a \"chat ID\" and a \"bot api token\" in this file.\n\n# Quickstarter with telegram bots\n\nCreation of new bots is managed by the BotFather.\n\nSearch __[@BotFather](https://t.me/BotFather)__ on telegram or click here: __[botfhater](https://t.me/BotFather)__.\n\nNow, create a new bot by typing the command __/newbot__ into the BotFather chat box or choose it by clicking on the square button at the rigth corner of the chat box. Then, select \"/newbot\".  The name of your new bot must have the suffix \"Bot\", for example:__\"laravel_log_bot\", \"LaravelBot\"__. The BotFather will ask you for a name and a username for your new bot (both of them must have the suffix \"Bot\").\n\nfinally, the __[@BotFather](https://t.me/BotFather)__ will send you a message like this: \n\n\u003e\u003e Done! Congratulations on your new bot. You will find it at __t.me/[YourUsernameBot]__. You can now add a description, about section and profile picture for your bot, see /help for a list of commands. By the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this.\n\u003e\u003e Use this token to access the HTTP API:\n\u003e\u003e __[TOKEN]__\n\u003e\u003e Keep your token secure and store it safely, it can be used by anyone to control your bot.\n\u003e\u003e For a description of the Bot API, see this page: https://core.telegram.org/bots/api\n\nGREAT, you have already created your first __telegram bot__.\n\nNext, copy the token (the one that has the format XXXX:YYYYYYYY) and save it in a safe place.\n\n# Usage\n\nOpen your \".env file\" and look for the following lines and paste the Token and Telegram Id (the ones you had copied before) as values for the following variables: \n\n1.  __TELEGRAM_BOT_ACCESS_TOKEN=__ paste here your __SECRET BOT API TOKEN__ ., \n2. __TELEGRAM_CHAT_ID=__ paste here your chat ID\n\n\n\u003e\u003e NOTE 1: Sometimes the ID value may have a \"-\" mark at the beginning; you should copy this symbol too.\n\n\u003e\u003e NOTE 2: IF THE ID VALUE HAS ANY SYMBOL AT THE BEGINING, PUT THE ID VALUE INSIDE QUOTATION MARKS. Example: \"-121412312\"\n\nnext open the __config/logging.php__ file, look for the \"channels\" array and overwrite it like this:\n\n```php\n[\n    ...\n    'channels' =\u003e [\n        'stack' =\u003e [\n            'driver' =\u003e 'stack',\n            'channels' =\u003e ['telegram', 'daily'],\n        ],\n\n        'telegram'  =\u003e[\n            'driver'  =\u003e 'monolog',\n            'handler' =\u003e \\Gjae\\TelegramLogChannel\\TelegramChannel::class,\n            'level'   =\u003e 'error'\n        ],\n\n        ...\n    ]\n]\n\n```\n\n# How to get the chat_id value\n\nYou can make a request to the url: __[https://api.telegram.org/bot[YourBotAccessToken]/getUpdates]\n(https://api.telegram.org/bot[YourBotAccessToken]/getUpdates)__ (change [YourBotAccessToken] by the \"bot token\" you have just gotten). Now you'll get a json like this:\n\n```json\n{\n    \"ok\": true,\n    \"result\": [\n        {\n            \"update_id\": 193532624,\n            \"message\": {\n                \"message_id\": 2,\n                \"from\": {\n                    \"id\": 259222478,\n                    \"is_bot\": false,\n                    \"first_name\": ....,\n                    \"last_name\": ...,\n                    \"username\": ...,\n                    \"language_code\": ...\n                },\n                \"chat\": {\n                    \"id\": 259222478,\n                    \"first_name\": ....,\n                    \"last_name\": ...,\n                    \"username\": ...,\n                    \"type\": \"private\"\n                },\n                \"date\": 1589138780,\n                \"text\": \"@channelusername\",\n                \"entities\": [\n                    {\n                        \"offset\": 0,\n                        \"length\": 16,\n                        \"type\": \"mention\"\n                    }\n                ]\n            }\n        },\n    ]\n}\n```\n\n# YOU'RE DONE!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgjae%2Flaravel-telegram-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgjae%2Flaravel-telegram-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgjae%2Flaravel-telegram-log/lists"}