PHPackages                             uitlaber/laravel-telegram-ray - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. uitlaber/laravel-telegram-ray

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

uitlaber/laravel-telegram-ray
=============================

A simple Laravel package to send ray() debug messages to Telegram.

v1.0.0(8mo ago)02MITPHPPHP ^8.1

Since Oct 15Pushed 8mo agoCompare

[ Source](https://github.com/uitlaber/laravel-telegram-ray)[ Packagist](https://packagist.org/packages/uitlaber/laravel-telegram-ray)[ RSS](/packages/uitlaber-laravel-telegram-ray/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

---

Laravel Telegram Ray
====================

[](#laravel-telegram-ray)

A simple and convenient Laravel package that adds a `ray()` helper function for sending debug information directly to your Telegram chat. It’s a great alternative to Xdebug, `dd()`, or `dump()`, especially when working on a remote server or when you want to receive instant notifications.

---

\## Features
------------

[](#-features)

- **Easy to use:** Familiar `ray()` function available anywhere in your Laravel application.
- **Any data:** Send strings, arrays, objects, collections, Eloquent models, and even exceptions.
- **Full context:** Each message automatically includes:

    - Project name
    - Relative file path and line number where the function was called
    - Full request URL, including all GET parameters
- **Flexible configuration:** All settings are handled in the `.env` file.
- **Easily disabled:** You can enable or disable the function entirely with one `.env` variable, without changing your code.

---

\## Installation
----------------

[](#-installation)

1. Install the package via Composer:

    ```
    composer require uitlaber/laravel-telegram-ray
    ```
2. Publish the configuration file:

    ```
    php artisan vendor:publish --provider="Uitlaber\LaravelTelegramRay\TelegramRayServiceProvider"
    ```

    This will create the file `config/telegram-ray.php`.

---

\## Configuration
-----------------

[](#-configuration)

Before using the package, you need to obtain your **bot token** and **chat ID** from Telegram.

1. **Bot token:** Create a new bot using **@BotFather** in Telegram and copy the API token it provides.
2. **Chat ID:** Open the **@userinfobot** in Telegram, start it, and it will send you your personal chat ID.

Now add these values and the `ENABLE_RAY_TELEGRAM` toggle to your `.env` file:

```
# .env

# Enables (true) or disables (false) sending messages
ENABLE_RAY_TELEGRAM=true

# Your bot token from @BotFather
TELEGRAM_BOT_TOKEN="YOUR:BOT_TOKEN"

# Your chat ID from @userinfobot
TELEGRAM_CHAT_ID="YOUR_CHAT_ID"
```

---

\## Usage
---------

[](#-usage)

You can call the `ray()` function anywhere in your Laravel application — in routes, controllers, models, services, or even inside Blade templates (within `@php ... @endphp`).

#### **Examples:**

[](#examples)

**Send a simple message:**

```
Route::get('/', function () {
    ray('User visited the homepage.');
    return view('welcome');
});
```

**Send an array or object:**

```
use App\Models\User;

$user = User::find(1);
ray($user->toArray());
```

**Send an exception:**

```
try {
    // Code that might throw an error
    throw new \Exception('Something went wrong!');
} catch (\Exception $e) {
    ray($e);
}
```

#### **Example in Blade:**

[](#example-in-blade)

```
@php
    $data = ['product_id' => 123, 'status' => 'pending'];
    ray($data);
@endphp

Product Card
```

---

\## Example Message in Telegram
-------------------------------

[](#-example-message-in-telegram)

Here’s how a debug message will appear in your Telegram chat:

> 🚀 **Laravel**📄 `routes/web.php:6`📍 `[GET] http://sandbox.test/?data=1`
>
> ```
> {
>     "id": 1,
>     "name": "Damir",
>     "email": "damir@example.com"
> }
> ```

---

\## License
-----------

[](#-license)

This package is open-source software licensed under the [MIT license](LICENSE.md).

---

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance59

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

262d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18505561?v=4)[uitlaber](/maintainers/uitlaber)[@uitlaber](https://github.com/uitlaber)

---

Top Contributors

[![uitlaber](https://avatars.githubusercontent.com/u/18505561?v=4)](https://github.com/uitlaber "uitlaber (4 commits)")

### Embed Badge

![Health badge](/badges/uitlaber-laravel-telegram-ray/health.svg)

```
[![Health](https://phpackages.com/badges/uitlaber-laravel-telegram-ray/health.svg)](https://phpackages.com/packages/uitlaber-laravel-telegram-ray)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k91.9k1](/packages/mike-bronner-laravel-model-caching)[illuminate/auth

The Illuminate Auth package.

10528.2M1.2k](/packages/illuminate-auth)[illuminate/routing

The Illuminate Routing package.

1419.2M3.0k](/packages/illuminate-routing)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
