PHPackages                             anwar/laravel-support - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. anwar/laravel-support

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

anwar/laravel-support
=====================

Support conversations and messaging module

0.0.1(3mo ago)07MITPHPPHP ^8.1

Since Feb 4Pushed 3mo agoCompare

[ Source](https://github.com/ringkubd/laravel-support)[ Packagist](https://packagist.org/packages/anwar/laravel-support)[ RSS](/packages/anwar-laravel-support/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Anwar Laravel Support 💬
=======================

[](#anwar-laravel-support-)

[![License](https://camo.githubusercontent.com/d40130fefcf799488c7727fb0d3ff0908720e31c0b9bdb6b15df15dec049e8bb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d253233434534363331)](https://camo.githubusercontent.com/d40130fefcf799488c7727fb0d3ff0908720e31c0b9bdb6b15df15dec049e8bb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d253233434534363331)[![PHP](https://camo.githubusercontent.com/3513b2935b425883450c8da659cc10e2b34b8e6be9d441b3a5d5ef5993f9d2f4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e312d253233434534363331)](https://camo.githubusercontent.com/3513b2935b425883450c8da659cc10e2b34b8e6be9d441b3a5d5ef5993f9d2f4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e312d253233434534363331)

A lightweight, production-ready Laravel package that provides support conversations and messaging features (conversations, messages, agents, guests, assignments, reads and broadcasting support channels).

---

Table of Contents
-----------------

[](#table-of-contents)

- [Highlights](#highlights)
- [Requirements](#requirements)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
    - [Routes / API](#routes--api)
    - [Broadcast Channels](#broadcast-channels)
    - [Events](#events)
- [Testing &amp; Development](#testing--development)
- [Contributing](#contributing)
- [License](#license)

---

Highlights ✅
------------

[](#highlights-)

- Conversation lifecycle: create, reply, assign, close
- Message read tracking and assignment history
- Guest support with configurable guards and rate-limits
- Built-in Broadcast channels and events for real-time UIs
- Policy-based authorization for agents and supervisors
- Auto-registers as a Laravel provider (PSR-4: `Anwar\\Support\\`)

---

Requirements 🔧
--------------

[](#requirements-)

- PHP &gt;= 8.1
- Laravel 10.x (or compatible 10.x series)
- Illuminate components: database, broadcasting, queue, support

---

Installation 📦
--------------

[](#installation-)

For a published package on Packagist:

```
composer require anwar/laravel-support
```

For local development in a monorepo, add to your root `composer.json`:

```
"repositories": [
  {
    "type": "path",
    "url": "packages/support"
  }
]
```

Then require the package (example for local dev):

```
composer require anwar/laravel-support:dev-main --prefer-source
```

The package supports Laravel's package auto-discovery. To register manually, add this to `config/app.php` providers:

```
Anwar\Support\SupportServiceProvider::class,
```

### Publish config

[](#publish-config)

```
php artisan vendor:publish --provider="Anwar\Support\SupportServiceProvider" --tag=support-config
```

### Migrate database

[](#migrate-database)

The package loads its own migrations automatically. Run:

```
php artisan migrate
```

---

Configuration ⚙️
----------------

[](#configuration-️)

Configuration file: `config/support.php`

Key configuration options include:

- `table_prefix` — prefix for package tables (default `support_`)
- `user_model` — your User model class
- `guards` — `customer` and `agent` guard settings
- `middleware` — middleware groups for customer/agent APIs
- `roles` — agent and supervisor role names
- `permissions` — permission names `view_inbox` and `view_all`
- `guest.enabled` — allow guest conversations
- `rate_limits` — customer/guest per-minute messaging throttles

Adjust these with your application environment variables (see `SUPPORT_*`).

---

Usage 🧭
-------

[](#usage-)

### Routes / API

[](#routes--api)

Routes are registered under the `/support` prefix (see `src/Routes/api.php`).

Customer-facing routes (middleware `support.middleware.customer`):

- POST `/support/conversations` — Create a conversation
- GET `/support/conversations/{conversation}` — Show conversation
- POST `/support/conversations/{conversation}/messages` — Add a message (throttled)
- POST `/support/conversations/{conversation}/read` — Mark as read
- POST `/support/conversations/{conversation}/typing` — Typing indicator

Agent routes (middleware `support.middleware.agent`):

- GET `/support/agent/inbox` — Agent inbox
- GET `/support/agent/conversations/{conversation}` — Show conversation
- POST `/support/agent/conversations/{conversation}/assign` — Assign conversation
- POST `/support/agent/conversations/{conversation}/close` — Close conversation
- POST `/support/agent/conversations/{conversation}/note` — Add internal note

### Broadcast channels

[](#broadcast-channels)

Defined in `src/Routes/channels.php`:

- `support.conversation.{conversationId}` — conversation updates
- `support.user.{userId}` — direct user notifications
- `support.agents` — agent/supervisor notifications

Authorization is delegated to `Anwar\Support\Services\SupportAccess`.

### Events

[](#events)

The package emits events for your real-time frontend:

- `SupportConversationCreated` — new conversation
- `SupportMessageCreated` — new message
- `SupportMessageRead` — message read update
- `SupportConversationAssigned` — conversation assignment
- `SupportConversationUpdated` — conversation metadata/status update
- `SupportTyping` — typing on/off

Each event is broadcasted to relevant channels—subscribe on the client to update conversation lists and messages in real-time.

### Models

[](#models)

- `Anwar\Support\Models\Conversation`
- `Anwar\Support\Models\Message`
- `Anwar\Support\Models\Participant`
- `Anwar\Support\Models\Read`
- `Anwar\Support\Models\Assignment`
- `Anwar\Support\Models\Guest`

Use the models directly or rely on the provided API controllers.

---

Testing &amp; Development 🧪
---------------------------

[](#testing--development-)

- Run your application test suite from the project root (phpunit)
- For local development, you may want to configure the package as a path repository (see installation) and run `composer dump-autoload` after changes

Good checks:

```
composer dump-autoload
php artisan migrate --seed
php artisan test
```

---

Contributing 🤝
--------------

[](#contributing-)

Contributions are welcome.

- Fork the repo
- Create a feature branch
- Add tests for new behavior
- Send a pull request with a clear description

Please follow PSR-12 coding style and add unit/integration tests for new features.

---

License
-------

[](#license)

MIT — see the `LICENSE` file.

---

Maintainers &amp; Support
-------------------------

[](#maintainers--support)

- Maintainer: ringkubd (repository owner)
- For issues and feature requests, please open an issue on the repository.

---

> Base color for package branding: `#CE4631`

---

If you'd like, I can also add examples for a JavaScript/Livewire front-end to consume the package's broadcasted events and realtime channels. 🔧

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance80

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

103d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b1333bbd2f796d53001d6dfbc3327f4c5ae72bca1a67fd4f32ee7375a538004?d=identicon)[ringkubd](/maintainers/ringkubd)

---

Top Contributors

[![ringkubd](https://avatars.githubusercontent.com/u/20917263?v=4)](https://github.com/ringkubd "ringkubd (1 commits)")

### Embed Badge

![Health badge](/badges/anwar-laravel-support/health.svg)

```
[![Health](https://phpackages.com/badges/anwar-laravel-support/health.svg)](https://phpackages.com/packages/anwar-laravel-support)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

20917.2M158](/packages/orchestra-canvas)[illuminate/broadcasting

The Illuminate Broadcasting package.

7126.5M178](/packages/illuminate-broadcasting)[laravie/serialize-queries

Serializable Laravel Query Builder

707.1M4](/packages/laravie-serialize-queries)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[kirschbaum-development/commentions

A package to allow you to create comments, tag users and more

12369.2k](/packages/kirschbaum-development-commentions)

PHPackages © 2026

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