$chat->getRouteKey(), 'key' => [ 'public' => $chat->getPublicKey(), 'route' => $chat->getRouteKey(), ], 'lead_id' => $chat->lead_id, 'channel' => $chat->channel, 'type' => $chat->type, 'message' => $chat->message, 'file_url' => $chat->file_url, 'url' => [ 'public' => trans_url('chat/'.$chat->getPublicKey()), 'user' => guard_url('chat/chat/'.$chat->getRouteKey()), ], 'status' => trans('app.'.$chat->status), 'created_at' => format_date($chat->created_at), 'updated_at' => format_date($chat->updated_at), ]; } }