Chatify
v1.3.x
v1.3.x
  • Introduction
  • Installation
  • Configurations
  • Customizations
  • APIs
  • Upgrading Chatify
  • Notes
  • Change Log
  • Github
Powered by GitBook
On this page
  • Display Name
  • Routes' Configurations
  • API Routes'
  • Pusher configurations
  • User Avatar
  • Attachments
  • Messenger Colors

Was this helpful?

Configurations

You can find package's configuration file at config/chatify.php in your application, and will find the following properties that you can modify inside it:

Display Name

This value is the name for the messenger displayed in the UI

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

Routes' Configurations

This value is package's routes' configurations

'routes' => [
    'prefix' => env('CHATIFY_ROUTES_PREFIX', 'chatify'),
    'middleware' => env('CHATIFY_ROUTES_MIDDLEWARE', ['web','auth']),
    'namespace' => env('CHATIFY_ROUTES_NAMESPACE', 'Chatify\Http\Controllers'),
],
  • prefix is the prefix of the routes in this package, so you can access the messenger from this value by going to /chatify.

  • middleware is the middleware array applied on the routes of this package.

  • namespace is the routes' controllers namespace.

API Routes'

'api_routes' => [
    'prefix' => env('CHATIFY_API_ROUTES_PREFIX', 'chatify'),
    'middleware' => env('CHATIFY_API_ROUTES_MIDDLEWARE', ['api']),
    'namespace' => env('CHATIFY_API_ROUTES_NAMESPACE', 'Chatify\Http\Controllers\Api'),
],

Pusher configurations

From here you can change pusher's configurations,

'pusher' => [
    'key' => env('PUSHER_APP_KEY'),
    'secret' => env('PUSHER_APP_SECRET'),
    'app_id' => env('PUSHER_APP_ID'),
    'options' => (array) [
        'cluster' => env('PUSHER_APP_CLUSTER'),
        'useTLS' => env('PUSHER_APP_USETLS'),
    ],
],

User Avatar

This is user's avatar configurations

'user_avatar' => [
    'folder' => 'users-avatar',
    'default' => 'avatar.png',
],
  • folder is the default folder name located in the storage to store users' avatars in.

  • default is the default user avatar image, before uploading a new one.

Attachments

This is attachments configurations

'attachments' => [
    'folder' => 'attachments',
    'download_route_name' => 'attachments.download',
    'allowed_images' => (array) ['png','jpg','jpeg','gif'],
    'allowed_files' => (array) ['zip','rar','txt'],
    'max_upload_size' => 150, // MB
],
  • folder is the default folder name located in the storage to store attachments in.

  • download_route_name is name of the route to download the attachments.

  • allowed_images is the default allowed images to be uploaded.

  • allowed_files is the default allowed files to be uploaded.

  • `max_upload_size` is the max file size allowed to be uploaded in the backend (e.g. message attachment, user avatar..).

Messenger Colors

/*
|-------------------------------------
| Messenger's colors
|-------------------------------------
*/
'colors' => (array) [
    '#2180f3',
    '#2196F3',
    '#00BCD4',
    '#3F51B5',
    '#673AB7',
    '#4CAF50',
    '#FFC107',
    '#FF9800',
    '#ff2522',
    '#9C27B0',
],

From the colors property you can set messenger's colors that users can change from the settings of their profile.

By default, there are 10 default colors as above.

PreviousInstallationNextCustomizations

Last updated 2 years ago

Was this helpful?