PHPackages                             gdpa/chabok - 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. gdpa/chabok

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

gdpa/chabok
===========

Chabok Notifications driver

v4.3(5y ago)54.0k2MITPHPPHP ^7.3|^8.0CI failing

Since Aug 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/gdpa/chabok)[ Packagist](https://packagist.org/packages/gdpa/chabok)[ Docs](https://github.com/gdpa/chabok)[ RSS](/packages/gdpa-chabok/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (6)Versions (14)Used By (0)

Chabok notifications channel for Laravel 5.3+
=============================================

[](#chabok-notifications-channel-for-laravel-53)

[![Latest Version on Packagist](https://camo.githubusercontent.com/445dd2a702da48403b620e2e355bebfafadd562dcfef4a1bd59a7b7b89323411/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f676470612f636861626f6b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gdpa/chabok)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/5056a87263e8b6ff75fdceae978abe41da697237e8784d9ffc4dd5169134b617/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f676470612f636861626f6b2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/gdpa/chabok)[![StyleCI](https://camo.githubusercontent.com/2cc5ac540377368a66aaf2a50eb3317165fca9dca6f764fa29b5a71d111c4af5/68747470733a2f2f7374796c6563692e696f2f7265706f732f3134353230353032342f736869656c64)](https://github.styleci.io/accounts/145205024)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/1af16b09635f6778f814bf454357f8022b658a16d0cb38d2c36f0ea370302e74/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f676470612f636861626f6b2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/gdpa/chabok/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/f3f5755a9a69c23539f908000bbe60996f44d0c3c7a05daa300cef3d0e196530/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f676470612f636861626f6b2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/gdpa/chabok/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/5b4e975df096380b6bb9cc7a3799607fe0e0134fac53ee50da2d522fccf7f5a8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f676470612f636861626f6b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gdpa/chabok)

This package makes it easy to sent [Chabok](https://chabokpush.com//) Notifications with Laravel 5.3+.

Contents
--------

[](#contents)

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

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

[](#installation)

You can install the package via composer:

```
composer require gdpa/chabok
```

Install for laravel 7:

```
composer require gdpa/chabok:^3.1
```

Install for laravel 6:

```
composer require gdpa/chabok:^2.0
```

Install for laravel &lt; 5.8:

```
composer require gdpa/chabok:^1.0
```

### Setting up the Chabok service

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

Add your Chabok REST API Key to your `config/services.php`:

```
// config/services.php
...
'chabok' => [
    'app_id' => env('CHABOK_APP_ID'),
    'key' => env('CHABOK_API_KEY'),
],
...
```

You can add additional configuration for adding to request from config:

```
// config/services.php
...
'chabok' => [
    'app_id' => env('CHABOK_APP_ID'),
    'key' => env('CHABOK_API_KEY'),
    'additional' => [
        'timeout' => 5,
        'request_timeout' => 10
    ]
],
...
```

**Note: If you want to test chabok set `app_id` to `sandbox`.**

Usage
-----

[](#usage)

Now you can use the channel in your `via()` method inside the notification:

```
use NotificationChannels\Chabok\ChabokChannel;
use NotificationChannels\Chabok\ChabokMessage;
use Illuminate\Notifications\Notification;

class ProjectCreated extends Notification
{
    public function via($notifiable)
    {
        return [ChabokChannel::class];
    }

    public function toChabok($notifiable)
    {
        return ChabokMessage::create()
            ->content("This is the Chabok notification description")
            ->data(['id' => 1, 'title' => 'This is notification data']);
    }
}
```

In order to let your Notification know which Chabok user you are targeting, add the `routeNotificationForChabok` method to your Notifiable model.

This method needs to return an uuid containing the your registered token on chabok.

```
public function routeNotificationForChabok()
{
    return [
        'uuid' => 'user-uuid-which-set-on-chabok-by-client',
    ];
}
```

### Available methods

[](#available-methods)

- `content('')`: Accepts a string value for the Chabok notification content.
- `trackId('')`: Accepts a string value for the Chabok notification trackId.
- `inApp()`: Call this if you want to set the Chabok notification inApp to true.
- `live()`: Call this if you want to set the Chabok notification live to true.
- `alert(''')`: Call this with no parameters if you want to set the Chabok notification useAsAlert to true. If you provide some string, it will set as alert text.
- `ttl('')`: Accepts a integer value for the Chabok notification ttl.
- `data([])`: Accepts a array for the Chabok notification data.
- `fallback([])`: Accepts a array for the Chabok notification fallback.
- `clientId('')`: Accepts a string value for the Chabok notification clientId.
- `notification([])`: Accepts a array for the Chabok notification notification.
- `idr()`: Call this if you want to set the Chabok notification idr to true.
- `silent()`: Call this if you want to set the Chabok notification silent to true.
- `binary('')`: Accepts a string value for the Chabok notification contentBinary.
- `type('')`: Accepts a string value for the Chabok notification contentType.
- `id('')`: Accepts a number value for the Chabok notification id.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Morteza Poussaneh](https://github.com/gdpa)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~87 days

Recently: every ~5 days

Total

11

Last Release

2036d ago

Major Versions

v1.0.2 → v2.02020-12-13

v2.0 → v3.02020-12-13

v3.0 → v4.02020-12-13

v3.1 → v4.12020-12-20

v3.2 → v4.22021-01-11

PHP version history (4 changes)v1.0.0PHP &gt;=7.0.0

v2.0PHP ^7.2

v4.0PHP ^7.3|^8.0

v3.1PHP ^7.2.5

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7866747?v=4)[MortezaPoussaneh](/maintainers/gdpa)[@gdpa](https://github.com/gdpa)

---

Top Contributors

[![gdpa](https://avatars.githubusercontent.com/u/7866747?v=4)](https://github.com/gdpa "gdpa (27 commits)")

---

Tags

chabok-notificationlaravelpush-notification

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gdpa-chabok/health.svg)

```
[![Health](https://phpackages.com/badges/gdpa-chabok/health.svg)](https://phpackages.com/packages/gdpa-chabok)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

88212.7M185](/packages/spatie-laravel-health)[craftcms/cms

Craft CMS

3.6k3.7M3.4k](/packages/craftcms-cms)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1239.7k25](/packages/fleetbase-core-api)[illuminate/http

The Illuminate Http package.

11938.5M8.0k](/packages/illuminate-http)[laravel-notification-channels/expo

Expo Notifications Channel for Laravel

67703.4k1](/packages/laravel-notification-channels-expo)[laravel-notification-channels/pushover

Pushover notifications for Laravel.

61190.7k6](/packages/laravel-notification-channels-pushover)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
