ayra/chatapps

A package for Laravel PHP Framework

Installs: 57

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

dev-master 2021-05-20 17:43 UTC

This package is auto-updated.

Last update: 2024-04-20 23:58:17 UTC


README

68747470733a2f2f312e62702e626c6f6773706f742e636f6d2f2d76746d784b48387a4a79382f58677665545773454a6b492f41414141414141414137512f794b736c724f70304132776a35567772634e4646326f6f525f6633626f72337577434c63424741735948512f73313630302f556e7469746c65642d31322e706e67

Latest Stable Version Total Downloads License

Chatify Laravel Package

A Laravel package that allows you to add a complete user messaging system into your new/existing Laravel application with only a few easy steps.

Important Notes (Update 2021/03/07)

  • I'm currently working to release v1.2.0 which will solve a lot of issues, Laravel 8+ support, and will come with a minor changes in the UI/UX ... like so.
  • And also I would like to mention that the documentation will be moved to Gitbook.
  • Chatify v2 will be delayed because it should be completely re-designed/re-coded (Back-end, UI/UX, features...), so it takes a time to be done! and also because of my job and time by general.
    At the end .. I promise that (Chatify v2 will be amazing), so be patient ❤️

Laravel 8+ support

Since this package currently (v1.0.1, v1.0.0) may not support Laravel 8+, But you can get it to work with Laravel 8+ after a few quite simple changes, as @lelu0 mentioned at munafio/chatify#66 (comment)

Requirements

  • PHP >=5.3.2.
  • Laravel >=5.4
  • Pusher Api Account.

Features

68747470733a2f2f312e62702e626c6f6773706f742e636f6d2f2d4b5350694c4c3374715f6f2f5867704c6d4367574175492f41414141414141414136772f6e366d346b324d43316a6f4e4d674b533656706b69322d337a3932485855765177434c63424741735948512f73313630302f53637265656e73686f7425324266726f6d253242323031392d31322d333025324232312d35392d35352e706e67

  • Users / groups(soon) chat system.
  • Real-time contacts list updates.
  • Favorites contacts list (Like stories style) and add to favorite button.
  • Saved Messages to save your messages online like Telegram messenger app.
  • Search functionality.
  • Contact item's last message indicator (e.g. You: ....).
  • Real-time user's active status.
  • Real-time typing indicator.
  • Real-time seen messages indicator.
  • Real-time internet connection status.
  • Upload attachments (Photo/File).
  • Shared photos, delete conversation.. (User's info right side).
  • Responsive design with all devices.
  • User settings and chat customization : user's profile photo, dark mode and chat color. with simple and wonderful UI design.

Demo

Installation

Video Tutorial on YouTube - Click Here

OR

Follow the steps below :

1. Install the package in your Laravel app

Quick Note: If you are installing this package in a new project, make sure to install the default user authentication system provided with Laravel.

$ composer require munafio/chatify

2. Pusher Api Settings

This package using Pusher Api, so you need to :

  • Create account and modify .env file of your Laravel app with your api credentials.
  • This package used a Pusher client events, and client events must be enabled for the application. You can do this in the Settings tab for your app within the Channels dashboard.
    Read more about Pusher 'Triggering client events'

68747470733a2f2f312e62702e626c6f6773706f742e636f6d2f2d314e313052346838744f302f58676f42483758773535492f41414141414141414136592f4b4252472d572d5071535166687131724b4173762d423631566669517677675467434c63424741735948512f73313630302f53637265656e73686f7425324266726f6d253242323031392d31322d333025324231362d34372d30352e706e67

3. Publishing Assets

Packages' assets to be published :
The Important assets:

  • config
  • assets
  • migrations

and the optional assets :

  • controllers (you need to configure this, if published)
  • views

to pusblish the assets, do the following command line with changing the tag value .. that means after --tag= write chatify- + asset name as mentioned above.
Example :

$ php artisan vendor:publish --tag=chatify-config
  • NOTE: Publishing assets means (e.g. config) that creating a copy of the package's config file into the config folder of your Laravel applications and like so with the other asstes (Package's Views, controllers, migrations ...).

4. Migrations

Migrate the new migrations that added by the previous step

$ php artisan migrate

5. Storage Symlink

Create a shourtcut or a symlink to the storage folder into the public folder

$ php artisan storage:link

6. App config

For Laravel <=v5.4 that doesn't support package auto-discovery, add the following provider into config/app.php providers array list :

...
/*
* Package Service Providers...
*/
\Chatify\ChatifyServiceProvider::class,
...

and the following alias into into config/app.php aliases:

...
/*
* Class Aliases
*/
'Chatify' => Chatify\Facades\ChatifyMessenger::class,
...
  • After installing the package, you can access the messeneger by the default path(route path) which is /chatify, and you can change path name in the config file config/chatify.php as mentioned in the configurations below.
That's it .. Enjoy :)

Configurations

You can find and modify the default configurations of the package at config/chatify.php file that you published in the step 2 of the installation steps .. and all configurations is documented well to be understood by other developers.

  • All package’s files is documented to understand the whole code.

Messenger Name

This value is the name of the app which is used in the views or elsewhere in the app.

...
'name' => env('CHATIFY_NAME', 'Chatify Messenger'),
...

Messenger Path in Your App

This value is the path of the package or in other meaning, it is the prefix of all the registered routes in this package. e.g (yourapp.domain/chatify)

...
'path' => env('CHATIFY_PATH', 'chatify'),
...

Package's web routes middleware

This value is the middleware of all routes registered in this package which is by default : auth.

...
'middleware' => env('CHATIFY_MIDDLEWARE', 'auth'),
...

Pusher API credentials

you don't need to modify the credentials of Pusher from here, because you already added your credentials in the .env file of your Laravel app.

User Avatar

This is the user's avatar setting that includes :

...
'user_avatar' => [
        'folder' => 'users-avatar',
        ...
    ],
...

which is the default folder name to upload and get user's avatar from.

...
'user_avatar' => [
        ...
        'default' => 'avatar.png',
    ],
...

which is the default avatar file name for users stored in database .. and when you publishing assets, a copy of the avatar photo will be copied into your storage path.

Attachments By Default

This array contains the important default values that used in this package :

...
'attachments' => [
        'folder' => 'attachments',
        ...
    ],
...

This is the default folder name for attachments in the storage which is all the attachments will be stored in .. and also going to be used in attachments urls in the views.

...
'attachments' => [
        ...
        'route' => 'attachments.download',
    ],
...

It is the route name of the download attachments method.

Controller's namespace

This proprty if you may need to change the namespace of the route's controllers of this package after publishing the 'controllers' asset, from the default one to your App's controllers namespace.

By default: Chatify\Http\Controllers
If published to be modified, it should be like: App\Http\Controllers\vendor\Chatify

...
'namespace' => env('CHATIFY_ROUTES_NAMESPACE', 'Chatify\Http\Controllers'),

Author

Munaf A. Mahdi

License

MIT