To send a local photo, add it properly to the `$data` parameter using the file path:
```php
$data=[
$result=Request::sendPhoto([
'chat_id'=>$chat_id,
'photo'=>Request::encodeFile('/path/to/pic.jpg'),
];
$result=Request::sendPhoto($data);
]);
```
If you know the `file_id` of a previously uploaded file, just use it directly in the data array:
```php
$data=[
$result=Request::sendPhoto([
'chat_id'=>$chat_id,
'photo'=>$file_id,
];
$result=Request::sendPhoto($data);
'photo'=>'AAQCCBNtIhAoAAss4tLEZ3x6HzqVAAqC',
]);
```
To send a remote photo, use the direct URL instead:
```php
$data=[
$result=Request::sendPhoto([
'chat_id'=>$chat_id,
'photo'=>'https://example.com/path/to/pic.jpg',
];
$result=Request::sendPhoto($data);
]);
```
*sendAudio*, *sendDocument*, *sendSticker*, *sendVideo*, *sendVoice* and *sendVideoNote* all work in the same way, just check the [API documentation](https://core.telegram.org/bots/api#sendphoto) for the exact usage.
...
...
@@ -369,8 +370,8 @@ See the [*ImageCommand.php*][ImageCommand.php] for a full example.