laravel-notification-channels/webex
A Laravel notification channel for Cisco Webex Teams (formerly Spark). Send notification messages to Webex rooms from your Laravel app using the familiar Notification API, with a simple channel class and configurable Webex bot/access token.
composer require laravel-notification-channels/webex — take the v2.x line on Laravel 11. The 2.0 bump is almost entirely a dependency alignment (illuminate ^11), so if you're still on Laravel 10 or below, pin ^1.0 until you upgrade.services.webex snippet before inventing one.php artisan make:notification DeployFinished, add the channel class to via(), return a WebexMessage from toWebex().routeNotificationForWebex() on the notifiable to return a Webex person email or a room ID, or address it directly on the message with ->to(...). For one-off sends, use Notification::route(WebexChannel::class, $roomId)->notify(...) — confirm the channel key the package registers against your installed version.WebexMessage::create()->text('...') for plain output, markdown methods for anything with a link, bold, or code block. Plain text renders literally — a raw URL in text is not clickable, so default to markdown for anything operational.WebexAlert notification taking (string $title, string $body, string $level = 'info') in the constructor beats fifteen near-identical notification classes. Swap to dedicated classes only when the payload shape genuinely differs.config/services.php behind an env var and read it inside toWebex(). Don't repeat it in every notification, and don't store it as a public property on a queued notification — it will be serialized into the jobs table.ShouldQueue. Without it, a slow or cold Webex API call adds its full latency to the user's request, and a Webex outage becomes a 500 in your app. Set $tries and $backoff so a transient 429 doesn't silently drop the alert.Notification::route(...) — but be aware N spaces means N HTTP calls; batch into one message with multiple mentions where the content is the same.app/Console/Kernel.php. If you're migrating scheduled Webex digests, move them to routes/console.php / the Schedule facade and verify they still fire before you retire the old deploy.composer why-not laravel-notification-channels/webex 2.* on each app, and don't blanket-update a monorepo where one service is still on L10.tinker with the ID before wiring it into a notification class.via() and that routeNotificationForWebex() returns non-null — temporarily Log::info() the return value. Missing routes can be skipped rather than raised.Notification::fake() plus assertSentTo($user, WebexChannel::class, fn ($n, $message) => ...) covers your notification wiring. Http::fake(['webexapis.com/*' => Http::response([], 200)]) covers the payload. Assert against $message->toArray() rather than individual getters — accessor names shift between majors, and the array is the stable surface./v1/messages; if you need adaptive cards, threading, or attachment uploads it likely won't expose them. Build the payload yourself with Http::withToken($token)->post('https://webexapis.com/v1/messages', [...]) from inside a notification rather than forking the channel — you keep the notification pipeline and still get the API surface.How can I help you explore Laravel packages today?