Download the PHP package uitlaber/laravel-telegram-ray without Composer
On this page you can find all versions of the php package uitlaber/laravel-telegram-ray. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download uitlaber/laravel-telegram-ray
More information about uitlaber/laravel-telegram-ray
Files in uitlaber/laravel-telegram-ray
Package laravel-telegram-ray
Short Description A simple Laravel package to send ray() debug messages to Telegram.
License MIT
Informations about the package 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
- 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
.envfile. - Easily disabled: You can enable or disable the function entirely with one
.envvariable, without changing your code.
Installation
-
Install the package via Composer:
-
Publish the configuration file:
This will create the file
config/telegram-ray.php.
Configuration
Before using the package, you need to obtain your bot token and chat ID from Telegram.
- Bot token: Create a new bot using @BotFather in Telegram and copy the API token it provides.
- 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:
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:
Send a simple message:
Send an array or object:
Send an exception:
Example in Blade:
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
License
This package is open-source software licensed under the MIT license.
All versions of laravel-telegram-ray with dependencies
illuminate/support Version ^9.0 || ^10.0 || ^11.0 || ^12.0
illuminate/http Version ^9.0 || ^10.0 || ^11.0 || ^12.0