Download the PHP package uzhlaravel/telegramlogs without Composer

On this page you can find all versions of the php package uzhlaravel/telegramlogs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package telegramlogs

Telegram Logs Monitor for Laravel

Latest Version on Packagist GitHub Tests Action Status Code style Total Downloads License


A Laravel package that sends your application logs, exceptions, and model activity events directly to a Telegram channel or group — in real time.

Supports Laravel 10 → 13, PHP 8.2+, and includes production-only mode so notifications stay silent during local development.


Table of Contents


Features


Requirements

Dependency Version
PHP ^8.2
Laravel ^10.0 | ^11.0 | ^12.0 | ^13.0

Installation

Run the interactive setup wizard:

The wizard will publish the config file, help you set environment variables, optionally enable activity log, and send a test message.

Or publish the config manually:


Configuration

Environment Variables

Add these to your .env file:

Full Reference

Variable Required Default Description
TELEGRAM_BOT_TOKEN Yes Bot API token from @BotFather
TELEGRAM_CHAT_ID Yes Target chat, channel, or group ID
TELEGRAM_TOPIC_ID No null Forum topic (thread) ID
TELEGRAM_TOPIC_MESSAGE_ID No null Forum thread message ID
TELEGRAM_LOG_LEVEL No critical Minimum PSR-3 level to send
TELEGRAM_TIMEOUT No 10 HTTP timeout in seconds
TELEGRAM_ENVIRONMENTS No production Comma-separated env list, or *
TELEGRAM_ACTIVITY_LOG No false Enable model activity tracking
TELEGRAM_ACTIVITY_LOG_LEVEL No info Log level for activity messages

Restrict to Production Only

By default, notifications are only sent when APP_ENV=production. This prevents your local machine or CI from flooding your Telegram channel.

The current environment and whether notifications are active are both shown in:


Usage

Log Channel Integration

Set Telegram as your default channel:

Or add it to a stack so critical logs go to both your file log and Telegram:

Use it like any Laravel logger:

Messages arrive in Telegram formatted like this:


Direct Messaging

Send arbitrary messages to Telegram without going through the logger — useful for contact forms, webhooks, or manual alerts.


Activity Log

Inspired by spatie/laravel-activitylog, the activity log tracks Eloquent model events and pushes a formatted notification to Telegram.

Enable it in .env:

HasTelegramActivity Trait

Add the trait to any Eloquent model to automatically track its lifecycle events:

On created, updated, or deleted, a message like the following is sent to Telegram:

Customise per model:

Global event list is controlled in config/telegramlogs.php:

TelegramActivity Facade

For manual / one-off activity notifications, use the fluent facade:


Artisan Commands


Log Levels

Level Emoji Use Case
emergency 🚨 System is unusable
alert 🔴 Immediate action required
critical 💥 Critical conditions
error Runtime errors
warning ⚠️ Potential issues
notice 📢 Significant normal events
info ℹ️ General operational messages
debug 🐛 Detailed diagnostic information

Getting Telegram Credentials

1. Create a Bot

  1. Open @BotFather in Telegram
  2. Send /newbot and follow the prompts
  3. Copy the token into TELEGRAM_BOT_TOKEN

2. Get Your Chat ID

3. Forum Topics (optional)

  1. Enable Topics in your group settings
  2. Create a topic and send a message
  3. From getUpdates, copy message_thread_idTELEGRAM_TOPIC_ID

Security


Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Commit your changes: git commit -m 'Add my feature'
  4. Push: git push origin feature/my-feature
  5. Open a pull request

Development commands:


License

This package is open-sourced software licensed under the MIT License.


💖 Made with love by Uzziah Lukeka


All versions of telegramlogs with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0||^12.0||^13.0
illuminate/database Version ^10.0||^11.0||^12.0||^13.0
illuminate/events Version ^10.0||^11.0||^12.0||^13.0
illuminate/support Version ^10.0||^11.0||^12.0||^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package uzhlaravel/telegramlogs contains the following files

Loading the files please wait ...