Blog Detail


A Google Chat notification channel Pacakge for Laravel cover image

arrow_back A Google Chat notification channel Pacakge for Laravel

Laravel Notification Channel introduced a package known as Google Chat that makes it effortless to send notifications with Laravel 8.x


You can install the Google Chat notification channel quickly via Composer:

$ composer require laravel-notification-channels/google-chat


This package provides a way to send notifications utilizing a custom Google chat message channel:

// Create a super simple message
public function toGoogleChat($notifiable)
return GoogleChatMessage::create('An invoice was paid!');

You can also do simple formatting and advanced card layouts using the package’s provided classes:

// Simple text formatting and routing to a specific chat room
  ->text('Someone just paid an invoice... ')
  ->line('Looking for ')
  ->link(route('invoices'), 'the details?')
  ->to('sales_team'); // ... and route it to specific rooms
 // Advanced card layout
->text('Invoice Paid! Here\'s the details:')
KeyValue::create('Amount', '$520.99', '#10004756')
->button(TextButton::create(route('invoices'), 'View'))

Alternate Rooms

In the end, this package has the notion of “alternate” rooms, which you can configure to directly send messages to a Google chat room instead of the default:

// config/google-chat.php
return [
    'spaces' => [
        'sales_team' => '',
        'dev_team' => '',
        'executive' => '',

// Usage

Learn More

If you are interested to learn more about this package, you can get full installation instructions and the source code on GitHub. You can also review the Laravel Notification Channels documentation for complete setup and usage details.

Published at : 29-07-2021

Author : Rizwan Aslam
Rizwan Aslam

I am a highly results-driven professional with 12+ years of collective experience in the grounds of web application development especially in laravel, native android application development in java, and desktop application development in the dot net framework. Now managing a team of expert developers at Codebrisk.

Launch your project

Launch project