DEF STUDIO srl

Need help with Laravel and web development?

Hire one of our experts for your projects.

We build tailored products, websites and platforms — with care for UX, performance and maintainability.

Booking open for Q3 — limited slots

Sending a message

After a bot and at least one chat have been set up, this package can be used to post new messages:

use DefStudio\Telegraph\Models\TelegraphChat;

$chat = TelegraphChat::query()
    ->where('name', 'Personal chat')
    ->firstOrFail();

$chat->html('<strong>Hello!</strong>')->send();
First Telegram message sent with Telegraph

as an alternative, messages can be formatted with markdown:

$chat->markdown("*Hello!*\n\nI'm here!")->send();

or markdownV2:

$chat->markdownV2("*Hello!*\n\nI'm here!")->send();

The full flow with installation, webhook, /start handler, and a test is covered in Build your first Telegram bot with Telegraph.

Suggest a change
Last updated 16 July 2026