- How do I install mollsoft/laravel-telegram-bot in Laravel 11?
- Run composer require mollsoft/laravel-telegram-bot in a Laravel 11+ application. Laravel's package auto-discovery should register the service provider; if it does not, add the provider to bootstrap/providers.php. Publish the package config and set your bot token in .env. Check the composer.json constraints for PHP and Laravel before installing.
- Which Laravel versions does mollsoft/laravel-telegram-bot support?
- The package is described as targeting Laravel 11 and newer, so treat Laravel 11+ as the supported baseline. Your PHP version and Laravel major must fall inside the constraints declared in the package's composer.json. Verify those constraints before upgrading Laravel or deploying to an older runtime. Laravel 10, Lumen, and non-Composer setups are not established as supported.
- How do I publish the mollsoft/laravel-telegram-bot config file?
- Use Laravel's vendor:publish command with the provider or tag the package documents. Publishing copies the package config into config/ so you can set tokens and bot options per environment. Do not overwrite your published file blindly on upgrades; diff it against the vendor version and merge intentionally. Run php artisan config:clear after changes.
- How do I create a Telegram bot command in Laravel?
- The package provides tools for handling Telegram updates and commands using Laravel conventions. Typically you define a handler or command class and register it in the package config, then route incoming updates to it. Check the package README for exact class names and method signatures because the 1.1.0 release notes are empty. Test by dispatching a sample update payload through your handler.
- How do I configure the bot token or multiple bots?
- Put the bot token in your published config backed by an environment variable such as TELEGRAM_BOT_TOKEN. Keep tokens out of version control and clear config cache after changes. If you need multiple bots, check whether the config supports named bot definitions; otherwise run separate config entries or app instances. Confirm multi-bot support in the package source before designing around it.
- How can I test Telegram bot logic without calling the Telegram API?
- Keep bot handlers as container-resolved classes so you can unit test them with fake Telegram update payloads. Fake the HTTP client used for Telegram API calls, or bind a fake bot client in Laravel's container during tests. Laravel's HTTP fake and container swap make this practical. Run your PHPUnit or Pest suite after upgrading to catch behavior changes.
- Is mollsoft/laravel-telegram-bot 1.1.0 a breaking change from 1.0?
- Under SemVer, 1.0.x to 1.1.0 is a backwards-compatible feature release, so no breaking API changes are expected. You can usually keep a ^1.0 constraint and pick up 1.1.0 with composer update. Still check PHP and Laravel version floors, new config keys, migrations, and transitive dependency changes, because those can break CI even in a minor release.
- Should I use a webhook or long polling with this package?
- The package handles Telegram updates, so both webhook and polling setups are plausible depending on what it documents. For a webhook, register a Laravel route with Telegram's setWebhook API and exclude it from CSRF in Laravel 11. For local development, long polling is usually easier than exposing a public URL. Confirm which mode the package supports before building around it.
- What are alternatives to mollsoft/laravel-telegram-bot?
- Common alternatives in the Laravel ecosystem include irazasyed/telegram-bot-sdk and lightweight custom wrappers around Telegram's Bot API using Laravel's HTTP client. Compare update handling, Laravel 11+ support, test coverage, config ergonomics, and maintenance activity. If you only need a few API calls, a small in-app service may be simpler than another dependency.
- Is mollsoft/laravel-telegram-bot actively maintained?
- Assess maintenance by checking commit recency, issue and pull request responsiveness, tagged changelog files, and whether the package has a test suite and CI matrix. The provided context shows version 1.1.0 but an empty release note, so do not rely on release bodies for upgrade safety. Pin a version in production and review the diff before updating. Packagist and GitHub activity are the practical signals.