PHPackages                             khonik/notifications - 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. khonik/notifications

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

khonik/notifications
====================

Fast way to create notifications

1.0.2(3y ago)0116MITPHPPHP ^7.3|^8.0

Since Mar 18Pushed 3y ago1 watchersCompare

[ Source](https://github.com/khorevnikita/notification_module)[ Packagist](https://packagist.org/packages/khonik/notifications)[ RSS](/packages/khonik-notifications/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (4)Used By (0)

Пакет для быстрого создания ручных уведомления
==============================================

[](#пакет-для-быстрого-создания-ручных-уведомления)

Установка
---------

[](#установка)

### 1. Ставим пакет

[](#1-ставим-пакет)

composer require khonik/notifications

### 2. Добавляем в config/app.php в массив providers

[](#2-добавляем-в-configappphp-в-массив-providers)

Khonik\\Notifications\\Providers\\ChatsServiceProvider::class

### 3. Публикуем миграции

[](#3-публикуем-миграции)

php artisan vendor:publish --provider="Khonik\\Notifications\\NotificationsServiceProvider"

### 4. Выполняем миграции

[](#4-выполняем-миграции)

php artisan migrate

### 5. Добавляем trait в модель User

[](#5-добавляем-trait-в-модель-user)

use Notifiable

### 6. Ставим ключи

[](#6-ставим-ключи)

в config/services.php:

```
'firebase'=> [
    'key'=>env("FIREBASE_KEY")
]

```

и в .env

```
FIREBASE_KEY=

```

Использование
-------------

[](#использование)

### Получить список уведомления

[](#получить-список-уведомления)

#### METHOD: GET

[](#method-get)

#### URL: /api/notifications

[](#url-apinotifications)

#### RESPONSE:

[](#response)

```
{
    "status": "success",
    "notifications": [
        {
            "id": 2,
            "type": "email",
            "title": "первое уведомление",
            "text": "Привет всем!",
            "sent_at": null,
            "created_at": "2022-01-28T10:47:45.000000Z",
            "updated_at": "2022-01-28T10:47:45.000000Z",
            "users_count": 0
        },
    ],
    "total": 1,
    "pages": 1
}

```

### Создать уведомление

[](#создать-уведомление)

#### METHOD: POST

[](#method-post)

#### URL: /api/notifications

[](#url-apinotifications-1)

#### BODY

[](#body)

```
{
    "type": "email",
    "title": "первое уведомление",
    "text": "Привет всем!"
}

```

#### RESPONSE:

[](#response-1)

```
{
    "status": "success",
    "notification": {
        "type": "email",
        "title": "первое уведомление",
        "text": "Привет всем!",
        "updated_at": "2022-01-28T10:47:10.000000Z",
        "created_at": "2022-01-28T10:47:10.000000Z",
        "id": 1
    }
}

```

### Изменить уведомление

[](#изменить-уведомление)

#### METHOD: PUT

[](#method-put)

#### URL: /api/notifications/{NOTIFICATION\_ID}

[](#url-apinotificationsnotification_id)

#### BODY

[](#body-1)

```
{
    "type": "email",
    "title": "первое уведомление!",
    "text": "Привет всем!"
}

```

#### RESPONSE:

[](#response-2)

```
{
    "status": "success",
    "notification": {
        "id": 3,
        "type": "email",
        "title": "первое уведомление!",
        "text": "Привет всем!",
        "sent_at": null,
        "created_at": "2022-01-28T10:47:49.000000Z",
        "updated_at": "2022-01-28T10:47:49.000000Z"
    }
}

```

### Удалить уведомление

[](#удалить-уведомление)

#### METHOD: DELETE

[](#method-delete)

#### URL: /api/notifications/{NOTIFICATION\_ID}

[](#url-apinotificationsnotification_id-1)

#### RESPONSE:

[](#response-3)

```
{
    "status": "success",
}

```

### Получить список прикреплённых пользователей

[](#получить-список-прикреплённых-пользователей)

#### METHOD: GET

[](#method-get-1)

#### URL: /api/notifications/{NOTIFICATION\_ID}/get-users

[](#url-apinotificationsnotification_idget-users)

#### RESPONSE:

[](#response-4)

```
{
    "status": "success",
    "users": [
        {
            "id": 1,
            "name": "Nikita",
        }
    ]
}

```

### Синхронизировать список пользователей

[](#синхронизировать-список-пользователей)

#### METHOD: POST

[](#method-post-1)

#### URL: /api/notifications/{NOTIFICATION\_ID}/set-users

[](#url-apinotificationsnotification_idset-users)

#### BODY

[](#body-2)

```
{
    "users": [
        1,
        2,
        3
    ]
}

```

#### RESPONSE:

[](#response-5)

```
{
    "status": "success"
}

```

### Поставить на отправку

[](#поставить-на-отправку)

#### METHOD: POST

[](#method-post-2)

#### URL: /api/notifications/{NOTIFICATION\_ID}/send

[](#url-apinotificationsnotification_idsend)

#### RESPONSE:

[](#response-6)

```
{
    "status": "success"
}

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 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 ~77 days

Total

3

Last Release

1367d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/75cd980834004e7acb5e91596badd9ca89bc14a523adb033d16ac79dd055e802?d=identicon)[khonik](/maintainers/khonik)

---

Top Contributors

[![209thCNR](https://avatars.githubusercontent.com/u/54576307?v=4)](https://github.com/209thCNR "209thCNR (9 commits)")

### Embed Badge

![Health badge](/badges/khonik-notifications/health.svg)

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

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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