Download the PHP package omnia/oalivechat without Composer
On this page you can find all versions of the php package omnia/oalivechat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package oalivechat
chat-package
Live Chat Laravel Package
Laravel's one-to-one chatting system package between admin and user, helps you add a complete real-time chatting system to your new/existing Laravel application with some commands.
Features
- chat system between admin and user.
- Real-time contact list updates.
- Upload attachments (Photo/File).
- Responsive design with all devices.
- Chat customization: chat color and font size. with a simple design.
...and much more you have to discover it yourself.
Demo
- Demo app - Click Here.
Documentation
1- Installation
Run the following command to install the package:
2- App Config
- In the
config/app.php
file, add the following line to theproviders
array:
3- publish Assets, css and js
- To publish the package's assets, CSS, and JS, run the following command:
This will create a liveChat/tools
directory in the public directory.
- If you want to change the user chat color and position, you can do so in
public/liveChat/tools/chat/css/final.css
4- Migration to database
-
make migration for your database
- make migration for package database
5- Middleware for authentication admin chat
- First, make sure to check the admin in the database and set its role_for_messages to
admin
, not 'user'. -
Create a middleware for checking the admin role:
-
Add the following code to the handle method inside the middleware:
-
Then, add the middleware in
app/Http/Kernel.php
: -
Create an AdminMessages middleware by this code:
-
Add the following code to the handle method inside the middleware:
-
add the middleware aliases in
app/Http/Kernel.php
: - Optionally, to show the
admin's status
in the user chat, make the following updates to theLoginController
:
if you want this step: you should have laravel Authentication to get loginController file.
Note
- You must have a directory for the admin dashboard (any route) with the name
admin.index
.
Usage
-
To import admin chat, create a link anywhere in your view, for example:
-
if you want the counter of messages => put this code on your view and only enter your id name When calling the function which you want the count appeares inside it.
-
For user chat, add the following code to a view that appears on all pages (e.g., footer):
- if you have static design you may put
$websiteName
and$websiteColor
any value or empty (e.g., "") but not remove them from the previous code.
Author
License
Live chat is licensed under the [MIT license]