Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Chatify Laravel Package

munafio/chatify

Chatify is a real-time one-to-one chat system for Laravel. Add messaging to new or existing apps with a single install command, including typing/seen indicators, online status, favorites, saved messages, search, attachments, emojis, and responsive UI with dark mode.

View on GitHub
Deep Wiki
Context7

Getting Started

Install Chatify with a single command:

composer require munafio/chatify
php artisan chatify:install
php artisan migrate

This publishes config (config/chatify.php), migrations, views, and assets. After seeding a test user, the chat interface is available at /chat (configurable via routes/chatify.php). First use case: integrate one-to-one messaging into a new/existing Laravel app in <5 minutes—ideal for MVPs or non-core features like marketplace seller-buyer chat.

Implementation Patterns

  • Custom user models: Set CHATIFY_USER_MODEL in config/chatify.php to use your existing App\Models\User.
  • Routing control: Use CHATIFY_ROUTES in config to disable/modify default routes or assign middleware (e.g., auth).
  • Custom WebSocket: Since v1.6.2, configure PUSHER_DRIVER and custom WS server in config/chatify.php—no code changes needed for self-hosted Pusher alternatives.
  • API-first use: Leverage API routes (/api/chatify/messages) for headless apps (e.g., React frontend) while keeping Laravel backend handling auth/persistence.
  • UI customization: Override resources/views/vendor/chatify/* via Blade templates, use CSS variables in assets/css/dark-mode.css, or adjust colors in config/chatify.php.

Gotchas and Tips

  • Security patches: Always upgrade to v1.6.5+ to avoid XSS in messages (fixed in sanitizeInput()), and enforce sanitize_inputs middleware in routes if overriding defaults.
  • Deployment quirks: Ensure storage/app/chatify is writable; file uploads fail silently if permissions are wrong. Use php artisan storage:link for public_disk storage.
  • Real-time pitfalls: Pusher requires valid credentials—even minor misconfigurations (e.g., wrong cluster) break WebSocket events. Test with php artisan tinker + Chatify::sendToUser().
  • Pagination limits: CHT_PAGINATION_LIMIT in config defaults to 10; increase for chats with many messages, but warn users about initial load time.
  • Extending core logic: Extend App\Http\Controllers\ChatifyController and rebind in routes/chatify.php for custom actions (e.g., adding message moderation). Use ChatifyMessenger::class methods for safe message actions (e.g., deleteMessage()).
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation
uri-template/tests