Getting Started
Install Chatify and open the messenger in a few steps
Follow these steps to add Chatify to a Laravel app with the bundled messenger UI.
Before you begin
Make sure you have:
- PHP 8.2+ and Laravel 11, 12, or 13
- Authentication already working (e.g. Laravel Breeze)
- A broadcasting driver ready (Pusher or Reverb)
1. Install the package
composer require munafio/chatify:^2.0@betaIf Composer rejects the beta constraint, add "minimum-stability": "beta" to composer.json, then run composer update.
2. Run the installer
php artisan chatify:install --with-ui
php artisan migrate
php artisan storage:linkThe --with-ui flag publishes the bundled messenger frontend at /chatify. Omit it if you only need the JSON API (headless mode).
This publishes config, migrations, routes, views, and frontend assets. Chatify creates six database tables for conversations, messages, settings, and related data.
3. Add the trait to your User model
<?php
namespace App\Models;
use Chatify\Traits\InteractsWithChatify;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use InteractsWithChatify;
}The trait adds relationships and helpers such as conversationWith(), sendMessageTo(), and participatesInConversation().
4. Set your environment
For the default setup — bundled UI with session auth — add to .env:
CHATIFY_API_MIDDLEWARE=web,auth
BROADCAST_CONNECTION=pusher
PUSHER_APP_ID=your-app-id
PUSHER_APP_KEY=your-app-key
PUSHER_APP_SECRET=your-app-secret
PUSHER_APP_CLUSTER=mt1Using Reverb instead? See Broadcasting.
Headless API mode (optional)
If you are building your own frontend with Laravel Sanctum:
CHATIFY_API_MIDDLEWARE=api,auth:sanctum
CHATIFY_WEB_ENABLED=false| Mode | Middleware | Web UI | Auth |
|---|---|---|---|
| Web (default) | web,auth | /chatify | Session cookie |
| API (headless) | api,auth:sanctum | Disabled | Bearer token |
5. Open the messenger
Log in, then visit /chatify:
<a href="/chatify">Messages</a>Or use the named route: route('chatify.index').
6. Verify it works
- Create two users (seeder, factory, or
tinker) - Log in as each user in separate browsers (or incognito)
- Start a conversation and confirm messages appear in real time
API mode: send a test request:
curl -H "Authorization: Bearer YOUR_TOKEN" \
http://localhost:8000/api/chatify/v1/conversationsYou should get a JSON response (empty list is fine on a fresh install).