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 DB_CONNECTION=mysql Please fill your PUSHER APP credentials in the PUSHER_APP_ID={ADD_YOUR_APP_ID} Please fill your PUSHER APP KEY in the 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.