- How do I install westacks/telebot-laravel in a Laravel app?
- Install it with composer require westacks/telebot-laravel, then run php artisan telebot:install. The install flow publishes config/telebot.php and sets up the service provider, facade, and handler scaffolding. You then add two environment variables and create one handler to get a first working webhook. The documented floor is low effort: a working setup is an hours-not-weeks task.
- Does westacks/telebot-laravel support Laravel 10 or Laravel 11?
- The provided material does not document a supported Laravel/PHP version matrix, so treat compatibility as unknown until verified. Check the package composer.json constraints, README, tag history, and CI status before committing. The adapter is coupled to upstream westacks/telebot versions, so adapter bumps may follow upstream bumps. There is no documented backwards-compatibility or upgrade policy in the supplied context.
- Should I use webhook or polling with telebot-laravel?
- Both webhook and polling are supported, and the choice is documented with a default recommendation. Use webhook in production when you have a public HTTPS endpoint; use polling for development or when no public endpoint exists. Polling requires a supervised worker process, while webhook routes are registered by the package. Webhook request validation checks POST/JSON, bot token match, secret token, and single update type.
- How do I handle Telegram updates and commands in telebot-laravel?
- Updates flow through a chain-of-responsibility pipeline: Kernel then UpdateHandler, CommandHandler, CallbackHandler, and RequestInputHandler. Handlers use trigger() and handle(); returning a value stops the pipeline, while returning null lets it continue. Commands are registered through the package and can be synced with php artisan telebot:commands. The implicit return-null-to-continue control flow is the main subtlety for developers used to middleware or listeners.
- Can I send Telegram notifications from Laravel using telebot-laravel?
- Yes. The package provides a Telegram notification channel via toTelegram and via(['telegram']), making Telegram a delivery channel alongside mail and Slack. It also includes a log driver for local or debug delivery. Telegram DTOs support dot-notation access such as $update->get('message.from.id'), which reduces array-shape guessing. This is the highest-leverage fit for typical Laravel products that already send notifications.
- How do I run multiple Telegram bots in one Laravel app?
- Use the BotManager for multi-bot registration and the publishable config/telebot.php to define bots. The TeleBot facade and framework-friendly configuration keep multiple bot registrations inside Laravel's normal config and service-container model. Each bot can be referenced through the manager rather than hard-coding a single token. Verify exact config keys against the published config file.
- How do I test telebot-laravel handlers without calling Telegram?
- The supplied material does not document an official testing helper, fake, or CI/test coverage. There is no sanctioned way described for testing handlers without calling Telegram. Because handlers are plain framework classes with trigger() and handle(), you can likely instantiate them and pass constructed update DTOs in unit tests, but confirm this against the repository. Also verify whether the package ships HTTP fakes or mocks before relying on that approach.
- Is telebot-laravel safe for production webhooks?
- Treat the default webhook route with care: it is registered at /telebot/webhook/{bot}/{token}, so the bot token appears in the URL path. That token can leak into access logs, proxies, and error trackers. Secret-token validation exists but is optional in the published config, so enable it and scrub logs. Handler exception behavior is undocumented; an unhandled throw means no reply and a lost update while Telegram retries on non-2xx, so wrap handlers and monitor failures.
- Does telebot-laravel work with multiple servers or containers?
- The default state storage is FileStorage, which assumes a single node. Any multi-instance deployment such as a load balancer, containers, or autoscaling will silently break conversation state until you implement StorageContract on DB or Redis. Queue semantics for outbound sends are not documented, so define retry and idempotency behavior for duplicate update_id delivery yourself. Plan a shared storage driver before scaling horizontally.
- Is westacks/telebot-laravel actively maintained and reliable?
- Adoption risk is the dominant concern: the package has about 15 stars and a small user base, so expect limited field testing, issue history, and community backstop. It is single-vendor (WeStacks) with no contributor depth or commercial support shown in the provided material. The last release is dated 2026-08-25; if genuine that suggests active maintenance, but verify tag history and release cadence. MIT licensing removes legal friction but gives no vendor leverage, so assume you may be the primary maintainer of any fork.