Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
vendor
/
laravel-notification-channels
/
telegram
/
src
:
TelegramPoll.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace NotificationChannels\Telegram; use JsonSerializable; use NotificationChannels\Telegram\Traits\HasSharedLogic; /** * Class TelegramPoll. */ class TelegramPoll implements JsonSerializable { use HasSharedLogic; public function __construct(string $question = '') { $this->question($question); } public static function create(string $question = ''): self { return new self($question); } /** * Poll question. * * @return $this */ public function question(string $question): self { $this->payload['question'] = $question; return $this; } /** * Poll choices. * * @return $this */ public function choices(array $choices): self { $this->payload['options'] = json_encode($choices); return $this; } }