# 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

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

## Storage Disk

The disk on which to store uploaded files and derived images by default. [More details](https://laravel.com/docs/filesystem)

```php
'storage_disk_name' => env('CHATIFY_STORAGE_DISK', 'public'),
```

## Routes' Configurations

This value is package's routes' configurations&#x20;

```php
'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'

```php
'api_routes' => [
    'custom' => env('CHATIFY_CUSTOM_ROUTES', false),
    '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,

```php
'pusher' => [
    'debug' => env('APP_DEBUG', false),
    'key' => env('PUSHER_APP_KEY'),
    'secret' => env('PUSHER_APP_SECRET'),
    'app_id' => env('PUSHER_APP_ID'),
    'options' => (array) [
        'cluster' => env('PUSHER_APP_CLUSTER'),
        'encrypted' => env('PUSHER_APP_USETLS'),
    ],
],
```

## User Avatar

This is user's avatar configurations

```php
'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 name, before uploading a new one.

## Gravatar

In this version (v1.4.x +) we add support for [Gravatar](https://gravatar.com), so now you can use he default user avatar which is by default, or enable **Gravatar** to use it over the default

```php
'gravatar' => [
    'enabled' => true,
    'image_size' => 200,
    'imageset' => 'identicon'
],
```

* `enabled` set to `true` if you want to enable **Gravatar** over the default user avatar.
* `image_size` the size of user avatar generated from Gravatar.
* `imageset` Default imageset to use from the options bellow:
  * &#x20;`404`
  * `mp`
  * `identicon` (default)
  * `monsterid`
  * `wavatar`

## Attachments

This is attachments configurations

```php
'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

```php
/*
|-------------------------------------
| 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.

## Notification sounds

```php
    /*
    |-------------------------------------
    | Sounds
    | You can enable/disable the sounds and
    | change sound's name/path placed at
    | `public/` directory of your app.
    |
    |-------------------------------------
    */
    'sounds' => [
        'enabled' => true,
        'public_path' => 'sounds/chatify',
        'new_message' => 'new-message-sound.mp3',
    ]

```

From the `sounds` property you can enable/disable notification sounds, change the public path where sounds located,  and change each sound file name if needed.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://chatify.munafio.com/configurations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
