Awesome Open Source
Awesome Open Source

Laravel Messenger

Latest Version on Packagist Total Downloads Tests StyleCI License


Preview


Prerequisites

  • PHP ^7.4 || ^8.0
  • Laravel ^8.42
  • SubstituteBindings::class route model binding enabled in your API / WEB middleware groups.
  • Configure your laravel apps broadcast driver, and set up your own websocket implementation, should you choose to listen in on our realtime broadcast.

Features

  • Realtime messaging between multiple models, such as a User, Admin, and a Teacher model.
  • RESTful API, allowing you to create your own UI or connect to your mobile app.
  • Support for morph maps on your provider models. See: Morph Maps
  • Private and group threads.
  • Private thread approval when the two participants are not friends.
  • Add participants in a group thread from your friends list.
  • Permissions per participant within a group thread.
  • Send image, document, audio, and video messages.
  • Message reactions, replies, edits, and deletion.
  • Group thread chat-bots. Ready-made bots
  • Friends, Search, and Online status systems.
  • Provider avatars, group thread avatars, and bot avatars.
  • Underlying calling system you can extend.
  • Group thread invitation links (like discord).
  • All actions are protected behind policies.
  • Scheduled commands for automated cleanup and checks.
  • Queued jobs fired from our event subscribers.
  • Most features can be toggled at runtime using our Messenger facade.
  • MessengerComposer facade allows you to have easy access to our core actions anywhere within your own app, such as sending messages, images, reactions, and more.
  • You can implement or extend your own BroadcastDriver, VideoDriver, and FriendDriver, simply by binding your classes into the container.
  • Optional extra payload when sending messages to allow custom json to be stored with the message.
  • Owner relationships returns a Ghost Profile when not found (null-object pattern).
  • Private threads auto-lock when the recipient is not found (deleted).

Upcoming for v2

  • Temporary Ephemeral conversations.
  • Improved API pagination / filters.
  • Condense attachment routes.
  • Possible extraction of friends system.
  • Better image manipulation / saving of multiple sizes.
  • Encryption of messages (E2E is the long term goal).
  • Translations for internal messages.

Notes

  • Read through our messenger.php config file before migrating!
  • This is a pure backend driven package providing an API to interact with, thus no web UI or websocket implementation will be setup for you.
  • Calling is disabled by default. You are responsible for implementing your own media server or connecting to a 3rd party service.

Installation

Composer

composer require rtippin/messenger

To complete our setup, please refer to the installation documentation listed below:


Documentation


Addons / Demo

  • Messenger Bots - Pre-made bots you can register within our core.
  • Messenger Faker - Adds commands useful in development environments to mock/seed realtime events and messages.
  • Messenger Web UI - Ready-made web routes and publishable views / assets, including default images.
  • Demo App - Our demo laravel app with this core package installed, including a Live Demo.

Credits - Richard Tippin

LICENSE | CHANGELOG

Security

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


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Php (404,198
Laravel (13,159
Discord (10,262
Video (4,425
Chatbot (3,496
Socket Io (3,368
Chat (3,259
Thread (928
Messenger (791
Message (682
Group (325
Pusher (296
Friends (221
Related Projects