botman/driver-facebook
Facebook Messenger driver for BotMan, letting PHP and Laravel developers connect chatbots to Messenger. Handle incoming messages, buttons, quick replies, attachments, and webhook integration through BotMan’s clean, familiar API.
composer require (check the package's README for the exact vendor/name), then publish any config with php artisan vendor:publish --tag=<package-config> if the package exposes one. In Laravel 5.5+ service provider and facade/alias discovery is automatic; on older versions register them in config/app.php..env (typically a page access token / app secret / verify token) and mirror them in config/services.php or the package config file. Never commit these; use per-environment values.README examples for sending a Generic Template. That is the core object this release touches, so it is the best smoke test.toMessenger/channel method) so sending is queued, retried, and testable like any other notification. This keeps controllers thin and centralizes recipient resolution.payload your webhook handler switches on. Treat payload strings as a contract—define them as constants/enums shared between sender and webhook handler.genericTemplate(array $elements) and quickReply(string $title, string $payload) so every send reuses validated structures rather than hand-rolling payload arrays.postback/message.quick_reply payloads, and routes to handlers. Keep verification middleware separate from business logic.Http::fake()) or the package's client to assert the JSON payload—especially the quick_replies array—without calling Facebook. Snapshot the payload for template-shape regressions.payload values are echoed back in webhook events. Namespace them (e.g. flow:step:action) so handlers don't collide as flows grow.Trying to access array offset on value of type null. If you previously worked around missing optional template fields with defensive defaults, you can often simplify—but keep guards on genuinely required fields and confirm behavior on your PHP version before removing them.php artisan config:clear in local/dev; stale cached config is a common "why is it sending as the wrong page" cause.composer.json and read release notes for payload-shape changes.How can I help you explore Laravel packages today?