russsiq/laravel-docs-ru

Call to undefined method NotificationChannels\Telegram\TelegramMessage::photo()

secrethero13 opened this issue · 0 comments

$ php -v
PHP 8.1.9 (cli) (built: Aug 2 2022 14:17:26) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.9, Copyright (c) Zend Technologies

$ php artisan --version
Laravel Framework 9.52.0

support
issues : https://github.com/laravel-notification-channels/telegram/issues
source : https://github.com/laravel-notification-channels/telegram/tree/3.0.0

I get an error

Call to undefined method NotificationChannels\Telegram\TelegramMessage::photo()

use NotificationChannels\Telegram\TelegramMessage;
use Illuminate\Notifications\Notification;

        return TelegramMessage::create()
            ->to($notifiable)
            ->content($this->title->name)
            ->photo($this->title->poster); #https://site.com/image.jpg

What is the problem related to? A message without a photo is sent normally