This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Route::get('/bot', function (\Telegram\Bot\Api $telegram) { | |
| $facade = Telegram::getAccessToken(); | |
| echo "Facade says: $facade <br />"; | |
| $di = $telegram->getAccessToken(); | |
| echo "DI says says: $di <br />"; | |
| $tg = app('\Telegram\Bot\Api'); | |
| $make = $tg->getAccessToken(); | |
| echo "App make says: $make <br />"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Telegram\Bot\Laravel; | |
| use Telegram\Bot\Api; | |
| use Illuminate\Support\ServiceProvider; | |
| /** | |
| * Class TelegramServiceProvider | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use ZipStream\ZipStream; | |
| Route::get('/test', function () { | |
| $tempStream = fopen('php://temp', 'w+'); | |
| $zipStream = new ZipStream(null, [ZipStream::OPTION_OUTPUT_STREAM => $tempStream]); | |
| $zipStream->addFile('MyTextFile.txt', 'This is the contents.'); | |
| $zipStream->finish(); | |
| rewind($tempStream); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Telegram\Support; | |
| use Illuminate\Support\Facades\Http; | |
| use Illuminate\Support\Facades\Log; | |
| use Illuminate\Support\Str; | |
| use Throwable; | |
| class HandleNutgramWebhookFailure |