sunarctech/laravel-chat 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

sunarctech/laravel-chat

Composer 安装命令:

composer require sunarctech/laravel-chat

包简介

Pre-build Laravel chat package.

README 文档

README

image

Laravel Chat System 💯

Pre-build Laravel chat package. You can use this package to create a chat/messaging Laravel application or you can use the pre-build front-end part to kick-start your project.

Packagist License For PHP Scrutinizer Code Quality Github Issues Github Stars Github Forks Packagist Packagist Release Packagist Downloads

Pre-build Laravel chat package. You can use this package to create a chat/messaging Laravel application or you can use the pre-build front-end part to kick-start your project.

Installation

Via Composer

composer require sunarctech/laravel-chat

then

php artisan chat:install

Instructions

Install this package and add authentication gurad, you can use some package like Laravel UI

This package uses WebSockets and for that dependent on beyondcode/laravel-websockets

Publish Files

php artisan vendor:publish --provider="BeyondCode\LaravelWebSockets\WebSocketsServiceProvider" --tag="config" --tag="migrations"

Configurations

Make necessary change in order to change file validations.

chat.php

return [
    'image_validation' => "max:1024|mimes:png,jpeg",
    'video_validation' => "max:102400|mimes:mp4",
    'file_validation' => "max:1024|mimes:txt",
];

Make necessary change in order to activate the websocket.

websockets.php

'enable_client_messages' => 'true',

broadcasting.php

'pusher' => [
    'driver' => 'pusher',
    'key' => env('PUSHER_APP_KEY'),
    'secret' => env('PUSHER_APP_SECRET'),
    'app_id' => env('PUSHER_APP_ID'),
    'options' => [
        'cluster' => env('PUSHER_APP_CLUSTER'),
        'useTLS' => true,
        'host' => '127.0.0.1',
        'port' => 6001,
        'scheme' => 'http',
    ],
],

Uncomment this provider from app.php, If not present please add this.

/*
* Application Service Providers...
*/
...
App\Providers\BroadcastServiceProvider::class,
...

.env

BROADCAST_DRIVER=pusher
PUSHER_APP_ID=myappid
PUSHER_APP_KEY=myappkey
PUSHER_APP_SECRET=myappsecret

Database

Package ships with some migration files, which is required in order to save the messages, defaul driver is used MySQL.

Migrate

php artisan migrate

Link Storage

php artisan storage:link

How to use?

In order to use the chat, Fisrt need to start the websocket server Using Command:

php artisan websocket:serve

Visit the route, registered with Package.

www.yourdomain.com/chat

Known Error

You might face dependency version mismatch issue at the time of installation, To fix the issue just add -W:

composer require sunarctech/laravel-chat -W

Created by SunArc Technologies

We are the leading Software Development Company providing end-to-end IT services & solutions to our esteemed customers in multiple industries and domains for the past 18+ years? Give us a call.

https://sunarctechnologies.com/
info@sunarctechnologies.com
+91-8764025209

🔧 Supported Versions

Versions supported.

Version Laravel Version PHP Version Support
0.1 <=7.0 7.3 - 8.x All features

License

The MIT Public License. Please see LICENSE for more information.

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-02-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固