定制 mahmoudkon/messenger 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mahmoudkon/messenger

最新稳定版本:v8

Composer 安装命令:

composer require mahmoudkon/messenger

包简介

messenger chat

README 文档

README

Laravel Messenger

Requirements

  • This messenger package requires PHP ^8.0 and laravel ^9.0, another version (7.0) for PHP < 8.0.
  • Install pusher server
    composer require pusher/pusher-php-server
  • set pusher configuration in your env file.
    PUSHER_APP_ID=#########
    PUSHER_APP_KEY=#########
    PUSHER_APP_SECRET=#########
    npm install --save-dev laravel-echo pusher-js
  • Make enable for client events from your pusher setting.

enable-client-events.PNG

Installation

You can install this package via composer using:

    composer require mahmoudkon/messenger

For php < 8

    composer require mahmoudkon/messenger:7.0

1- Use this trait in your User.php model

    ...
    use Illuminate\Foundation\Auth\User as Authenticatable;
    use Messenger\Chat\Traits\Messageable;

    class User extends Authenticatable
    {
        use Messageable;
    }

2- make publish for views and assets files

    php artisan vendor:publish --tag=messenger

can make publish for each file using

    php artisan vendor:publish --tag=messenger-config
    php artisan vendor:publish --tag=messenger-migrations
    php artisan vendor:publish --tag=messenger-assets
    php artisan vendor:publish --tag=messenger-views

3- run migrations:

    php artisan migrate

4- include app.js file in the messanger/index.blade.php:

for mix

    <script type="text/javascript" src="{{ asset('js/app.js') }}"></script>

for vite

    @vite(['resources/js/app.js'])

Note

please check configuration file if you have problem with display image

Features

1- Welcome page to list users and conversations

wlecome page

2- profile for each user

user profile

3- search in users

search

4- send Media or attachment and download

send media

5- Typing event

typing

6- scrolling will start at the first unread message with the count of unread messages displayed.

new-messagescount

7- read icons

  • when send message to user and he is offline, the icon will be one check icon.

  • when back to online the icon will be double ckeck.

  • When the message is read, the color of the icon will change to green color.

not-receive-message

统计信息

  • 总下载量: 145
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 1
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固