PHPackages                             vrajroham/laravel-flock-notification - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. vrajroham/laravel-flock-notification

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

vrajroham/laravel-flock-notification
====================================

Laravel Flock Notification Channel

v2.0.0(4y ago)177.6k6[1 issues](https://github.com/vrajroham/laravel-flock-notification/issues)[1 PRs](https://github.com/vrajroham/laravel-flock-notification/pulls)MITPHPPHP &gt;=7.4 || &gt;=8.0 || &gt;=8.1

Since Mar 28Pushed 3y ago1 watchersCompare

[ Source](https://github.com/vrajroham/laravel-flock-notification)[ Packagist](https://packagist.org/packages/vrajroham/laravel-flock-notification)[ Docs](https://github.com/vrajroham/laravel-flock-notification)[ RSS](/packages/vrajroham-laravel-flock-notification/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (4)Versions (10)Used By (0)

Laravel Flock Notification Channel
==================================

[](#laravel-flock-notification-channel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ddf698eb1d4eb6aafc901647c69f85026ee29d7751a4cdbe2a3b5bf8d6da8b24/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7672616a726f68616d2f6c61726176656c2d666c6f636b2d6e6f74696669636174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vrajroham/laravel-flock-notification)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/5f07b1a6a0229e1541841b3e0b645ea61356f3b0ecdfe055281aa7cbf90d5ec6/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7672616a726f68616d2f6c61726176656c2d666c6f636b2d6e6f74696669636174696f6e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/vrajroham/laravel-flock-notification)[![StyleCI](https://camo.githubusercontent.com/0fa143fab803c26932ce8131ff1c0015a4d261d79b229cc9aae9518bfbac6dff/68747470733a2f2f7374796c6563692e696f2f7265706f732f3132373138343031352f736869656c64)](https://styleci.io/repos/127184015)[![Quality Score](https://camo.githubusercontent.com/8dc8be254660bc3b24076ec062b080e98742f270be5dff79a6a0e4f951fec189/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7672616a726f68616d2f6c61726176656c2d666c6f636b2d6e6f74696669636174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/vrajroham/laravel-flock-notification)[![Total Downloads](https://camo.githubusercontent.com/b25952fe333de922e529dcf87bedd555cc534848e33f834cf1ab547d5bd2be47/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7672616a726f68616d2f6c61726176656c2d666c6f636b2d6e6f74696669636174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vrajroham/laravel-flock-notification)

This package makes it easy to send notifications using [Flock](https://flock.com/) with Laravel 5.3+.

```
return FlockMessage::create()
    ->content('Laravel Flock Notification Channel')
    ->attachment(function ($attachment) {
                $attachment->title('Button Widget')
                    ->description('Description')
                    ->color('#fff000');
            });
```

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Setting up the Flock service](#setting-up-the-flock-service)
- [Usage](#usage)
    - [Available Message methods](#available-message-methods)
- [Examples](#examples)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

Installation
------------

[](#installation)

Install this package with Composer:

```
composer require vrajroham/laravel-flock-notification

```

Register the ServiceProvider in your config/app.php (If you are using Laravel &lt; 5.5):

```
Vrajroham\LaravelFlockNotification\FlockServiceProvider::class,

```

Setting up the flock service
----------------------------

[](#setting-up-the-flock-service)

Create incoming webhook by going to [https://admin/flock.com](https://admin.flock.com) or by choosing **Manage your team** in Flock desktop app.

For more information see the [flock documentation](https://docs.flock.com/display/flockos/Create+An+Incoming+Webhook) to create incoming webhook.

Usage
-----

[](#usage)

You can now send messages in Flock Group by creating a FlockMessage:

- Add `routeNotificationForFlock()` to `App\User` model

```
public function routeNotificationForFlock()
{
    return $this->flock_webhook_url;
}
```

```
