LooVia是基于Boostrap 4.5.0,Laravel 8 ,PUSHER构建的一套响应式IM即时聊天系统源码,支持亮暗双模式。您可以通过进行一些更改来非常快速地更改模式。我们在实时聊天应用程序中使用了PUSHER第三方服务。它具有许多功能,例如一对一聊天、联系人、发送文件、在线用户、已读和未读用户的新消息、身份验证页面等等。

你可以到这里申请PUSHER第三方服务API,有免费的和付费的,根据你需要申请,免费的有额度限制,每天不超过20万条消息,并发数不超过100。

演示系统

演示地址

安装条件

请按照以下步骤安装和设置所有必备组件:

  • Composer:Make sure to have the Composer installed & running in your computer.
  • Git:Make sure to have the Git installed globally & running on your computer. If you already have installed git on your computer, you can skip this step.

安装说明

要设置聊天应用程序,请执行以下步骤:

  • 安装前提,确保在您的计算机上安装并运行以上所有必备组件。
  • 完成上述步骤后,可以运行以下命令在本地运行项目或生成以供生产环境使用:
Command Description
composer install command to install all of the framework’s dependencies.
Please run the below command to generate the new APP_KEY.

php artisan key:generate

Please fill your DB credentials in the .env file.

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=loowp
DB_USERNAME=root
DB_PASSWORD=

Please fill your PUSHER APP credentials in the .env file.

PUSHER_APP_ID={ADD_YOUR_APP_ID}
PUSHER_APP_KEY={ADD_YOUR_APP_KEY}
PUSHER_APP_SECRET={ADD_YOUR_APP_SECRET}
PUSHER_APP_CLUSTER={ADD_YOUR_APP_CLUSTER}

Please fill your PUSHER APP KEY in the public/js/custom.js file. You can create PUSHER APP KEY from this link https://pusher.com.

var pusher = new Pusher(‘{ADD_YOUR_PUSHER_APP_KEY}’, { cluster: ‘ap2’, forceTLS: true });

Please run the following commands to clear all cache from the project.

php artisan optimize

php artisan migrate:fresh This will migrate the database tables. For more details visit https://laravel.com/docs/8.x/migrations
php artisan db:seed This will insert the database tables data. For more details visit https://laravel.com/docs/8.x/seeding
php artisan serve The development server is accessible at http://localhost:8000.
To run on other port just run command : php artisan serve –port=8001

注意事项

如果您使用的是Linux服务器,请确保为存储文件夹提供www-data用户权限。

Make sure to provide www-data user permissions to storage folder if you are using Linux server.

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。