ChatifyPHP

Configuration

Complete reference for every config/chatify.php option

After running the installer, the configuration file is published to config/chatify.php. This page documents every key.

General

KeyDefaultDescription
nameChatify MessengerApplication name shown in the UI. Env: CHATIFY_NAME
storage_disk_namepublicLaravel filesystem disk for attachments and avatars. Env: CHATIFY_STORAGE_DISK

Models

Override the default Eloquent model classes if you need to extend them:

'models' => [
    'user'         => App\Models\User::class,
    'conversation' => Chatify\Models\Conversation::class,
    'message'      => Chatify\Models\Message::class,
    'participant'  => Chatify\Models\ConversationParticipant::class,
    'favorite'     => Chatify\Models\Favorite::class,
    'block'        => Chatify\Models\UserBlock::class,
    'user_setting' => Chatify\Models\UserSetting::class,
],

To use a custom model, create a class that extends the Chatify model and update the config:

'models' => [
    'message' => App\Models\ChatMessage::class,
],

Tables

Override table names if they conflict with your existing schema:

'tables' => [
    'conversations' => 'ch_conversations',
    'participants'  => 'ch_conversation_participants',
    'messages'      => 'ch_messages',
    'favorites'     => 'ch_favorites',
    'blocks'        => 'ch_user_blocks',
    'user_settings' => 'ch_user_settings',
],

API

'api' => [
    'prefix'       => env('CHATIFY_API_PREFIX', 'api/chatify/v1'),
    'middleware'    => [...], // resolved from CHATIFY_API_MIDDLEWARE
    'expose_email' => env('CHATIFY_EXPOSE_EMAIL', false),
],
KeyDefaultDescription
api.prefixapi/chatify/v1URL prefix for all API routes
api.middlewareweb,auth or api,auth:sanctumMiddleware stack. Resolved from CHATIFY_API_MIDDLEWARE env var. Defaults to web,auth when web is enabled, api,auth:sanctum otherwise.
api.expose_emailfalseWhether to include user email addresses in API responses

Web (bundled UI)

'web' => [
    'enabled'    => env('CHATIFY_WEB_ENABLED', true),
    'prefix'     => env('CHATIFY_ROUTES_PREFIX', 'chatify'),
    'middleware' => ['web', 'auth'],
    'layout'     => env('CHATIFY_WEB_LAYOUT', 'Chatify::layouts.app'),
],
KeyDefaultDescription
web.enabledtrueLoad the web routes (/chatify). Set to false for API-only mode.
web.prefixchatifyURL prefix for the messenger page
web.middleware['web', 'auth']Middleware for web routes
web.layoutChatify::layouts.appBlade layout template

User avatar

'user_avatar' => [
    'folder'  => 'users-avatar',
    'default' => 'avatar.png',
],
KeyDefaultDescription
user_avatar.folderusers-avatarStorage folder for user avatars
user_avatar.defaultavatar.pngDefault avatar filename

Gravatar

'gravatar' => [
    'enabled'    => true,
    'image_size' => 200,
    'imageset'   => 'identicon',
],
KeyDefaultDescription
gravatar.enabledtrueUse Gravatar for users without a custom avatar
gravatar.image_size200Gravatar image size in pixels
gravatar.imagesetidenticonGravatar default image style (identicon, monsterid, wavatar, etc.)

Attachments

'attachments' => [
    'folder'          => 'attachments',
    'allowed_images'  => ['png', 'jpg', 'jpeg', 'gif'],
    'allowed_files'   => ['zip', 'rar', 'txt', 'webm', 'ogg', 'mp4', ...],
    'max_upload_size' => env('CHATIFY_MAX_FILE_SIZE', 150),
],
KeyDefaultDescription
attachments.folderattachmentsStorage folder for attachments
attachments.allowed_images['png', 'jpg', 'jpeg', 'gif']Allowed image extensions
attachments.allowed_filesSee config fileAllowed non-image file extensions
attachments.max_upload_size150Maximum upload size in MB. Env: CHATIFY_MAX_FILE_SIZE

Giphy

'giphy' => [
    'enabled' => env('CHATIFY_GIPHY_ENABLED', true),
    'api_key' => env('CHATIFY_GIPHY_API_KEY'),
],
KeyDefaultDescription
giphy.enabledtrueEnable the Giphy sticker picker
giphy.api_keynullYour Giphy API key. Get one at developers.giphy.com

Colors

'colors' => [
    'enabled' => env('CHATIFY_COLORS_ENABLED', true),
    'list'    => ['#2180f3', '#2196F3', '#00BCD4', ...],
],
KeyDefaultDescription
colors.enabledtrueLet users pick a chat accent color
colors.list10 hex colorsAvailable color options

Themes

'themes' => [
    'enabled' => env('CHATIFY_THEMES_ENABLED', true),
    'list'    => ['classic', 'day', 'tinted', 'night'],
],
KeyDefaultDescription
themes.enabledtrueLet users switch themes
themes.list['classic', 'day', 'tinted', 'night']Available theme names

Fonts

'fonts' => [
    'enabled' => env('CHATIFY_FONTS_ENABLED', true),
    'list'    => ['system', 'segoe', 'arial', 'helvetica', ...],
],
KeyDefaultDescription
fonts.enabledtrueLet users choose a chat font
fonts.list17 font namesAvailable font options

Chat background (wallpaper)

'chat_background' => [
    'enabled'      => env('CHATIFY_WALLPAPER_ENABLED', true),
    'folder'       => 'chat-backgrounds',
    'patterns_url' => env('CHATIFY_PATTERNS_URL', '/vendor/chatify/patterns'),
    'patterns'     => [
        ['name' => 'Bubbles',   'filename' => 'bubbles.svg'],
        ['name' => 'Circuit',   'filename' => 'circuit-board.svg'],
        ['name' => 'Glamorous', 'filename' => 'glamorous.svg'],
        ['name' => 'Hideout',   'filename' => 'hideout.svg'],
    ],
],
KeyDefaultDescription
chat_background.enabledtrueLet users set a chat background
chat_background.folderchat-backgroundsStorage folder for custom backgrounds
chat_background.patterns_url/vendor/chatify/patternsPublic URL for built-in SVG patterns
chat_background.patterns4 patternsAvailable wallpaper patterns

Groups

Group conversations support four roles: owner (full control, one per group), admin (full or scoped permissions), moderator (add/remove members), and member (send messages only). Admins can be scoped with JSON permissions: edit_info, add_members, remove_members, and manage_admins.

Create a group with POST /api/chatify/v1/conversations/group. Upload an avatar with POST /api/chatify/v1/conversations/{conversation}/avatar. Manage participants via GET/POST/PATCH/DELETE on /conversations/{conversation}/participants. The owner can transfer ownership with POST /conversations/{conversation}/transfer-ownership; any participant can leave with POST /conversations/{conversation}/leave.

'groups' => [
    'enabled'                => env('CHATIFY_GROUPS_ENABLED', true),
    'min_participants'       => 2,
    'max_participants'       => env('CHATIFY_GROUP_MAX_PARTICIPANTS', 50),
    'max_name_length'        => 100,
    'max_description_length' => 500,
    'avatar_folder'          => 'groups-avatar',
    'preview_members'        => 6,
],
KeyDefaultDescription
groups.enabledtrueEnable or disable group conversations
groups.min_participants2Minimum participants (including creator)
groups.max_participants50Maximum participants per group
groups.max_name_length100Maximum characters for group name
groups.max_description_length500Maximum characters for group description
groups.avatar_foldergroups-avatarStorage folder for group avatars
groups.preview_members6Number of members shown in the inbox preview

Sounds

'sounds' => [
    'enabled'          => env('CHATIFY_SOUNDS_ENABLED', true),
    'incoming_message' => [
        'enabled' => env('CHATIFY_SOUND_INCOMING_ENABLED', true),
        'url'     => env('CHATIFY_SOUND_INCOMING', '/vendor/chatify/sounds/incoming.wav'),
    ],
    'outgoing_message' => [
        'enabled' => env('CHATIFY_SOUND_OUTGOING_ENABLED', true),
        'url'     => env('CHATIFY_SOUND_OUTGOING', '/vendor/chatify/sounds/outgoing.wav'),
    ],
    'typing' => [
        'enabled' => env('CHATIFY_SOUND_TYPING_ENABLED', false),
        'url'     => env('CHATIFY_SOUND_TYPING', '/vendor/chatify/sounds/typing.wav'),
    ],
],
KeyDefaultDescription
sounds.enabledtrueMaster switch for all sound effects
sounds.incoming_message.enabledtruePlay sound on incoming messages
sounds.incoming_message.url/vendor/chatify/sounds/incoming.wavURL for incoming message sound
sounds.outgoing_message.enabledtruePlay sound on outgoing messages
sounds.outgoing_message.url/vendor/chatify/sounds/outgoing.wavURL for outgoing message sound
sounds.typing.enabledfalsePlay sound when someone is typing
sounds.typing.url/vendor/chatify/sounds/typing.wavURL for typing sound

Saved messages

Saved Messages is a personal self-chat (Conversation::TYPE_SAVED) auto-created the first time a user opens the messenger. The user is the only participant — use it for bookmarks, notes, links, or file storage. Messages work like regular messages: text, attachments, and forwards from other conversations are all supported.

Saved-messages conversations cannot be hidden or deleted. Clear all messages (keeping the conversation) with:

POST /api/chatify/v1/conversations/{conversation}/clear
'saved_messages' => [
    'enabled' => env('CHATIFY_SAVED_MESSAGES_ENABLED', true),
    'title'   => env('CHATIFY_SAVED_MESSAGES_TITLE', 'Saved Messages'),
],
KeyDefaultDescription
saved_messages.enabledtrueEnable or disable saved messages
saved_messages.titleSaved MessagesDisplay name shown in the UI

Frontend

'frontend' => [
    'asset_url' => env('CHATIFY_ASSET_URL'),
    'broadcast' => [
        'driver'   => env('CHATIFY_BROADCAST_DRIVER', env('BROADCAST_CONNECTION', 'null')),
        'key'      => env('PUSHER_APP_KEY'),
        'cluster'  => env('PUSHER_APP_CLUSTER', 'mt1'),
        'wsHost'   => env('PUSHER_HOST'),
        'wsPort'   => (int) env('PUSHER_PORT', 443),
        'forceTLS' => env('PUSHER_APP_USETLS', true),
    ],
],
KeyDefaultDescription
frontend.asset_urlnullCustom base URL for frontend assets (CDN). When null, assets are served from /vendor/chatify/.
frontend.broadcast.*From Pusher env varsBroadcasting connection settings passed to the frontend Echo instance

See Broadcasting for full setup instructions.

Localization

'rtl_locales' => ['ar', 'he', 'fa', 'ur'],

'locale' => [
    'middleware'       => env('CHATIFY_LOCALE_MIDDLEWARE', true),
    'detect_via'       => ['header', 'query', 'user', 'app'],
    'header'           => 'Accept-Language',
    'fallback_header'  => 'X-Chatify-Locale',
    'query_parameter'  => 'locale',
    'user_attribute'   => 'locale',
],

See Localization for details.

Feature toggles summary

Quick reference for all boolean toggles:

FeatureConfig keyEnv varDefault
Web UIweb.enabledCHATIFY_WEB_ENABLEDtrue
Groupsgroups.enabledCHATIFY_GROUPS_ENABLEDtrue
Saved messagessaved_messages.enabledCHATIFY_SAVED_MESSAGES_ENABLEDtrue
Giphygiphy.enabledCHATIFY_GIPHY_ENABLEDtrue
Colorscolors.enabledCHATIFY_COLORS_ENABLEDtrue
Themesthemes.enabledCHATIFY_THEMES_ENABLEDtrue
Fontsfonts.enabledCHATIFY_FONTS_ENABLEDtrue
Wallpaperchat_background.enabledCHATIFY_WALLPAPER_ENABLEDtrue
Sounds (master)sounds.enabledCHATIFY_SOUNDS_ENABLEDtrue
Incoming soundsounds.incoming_message.enabledCHATIFY_SOUND_INCOMING_ENABLEDtrue
Outgoing soundsounds.outgoing_message.enabledCHATIFY_SOUND_OUTGOING_ENABLEDtrue
Typing soundsounds.typing.enabledCHATIFY_SOUND_TYPING_ENABLEDfalse
Locale middlewarelocale.middlewareCHATIFY_LOCALE_MIDDLEWAREtrue
Gravatargravatar.enabled--true
Expose emailapi.expose_emailCHATIFY_EXPOSE_EMAILfalse

On this page