defstudio / telegraph

Telegraph is a Laravel package for fluently interacting with Telegram Bots
MIT License
674 stars 116 forks source link

get caht instance by userName #573

Closed MoLeft closed 5 months ago

MoLeft commented 5 months ago

When using the Chat model, how should I get the instance based on the userName?

fabio-ivona commented 5 months ago

not possible, you should keep track fo username-chat_id binding by yourself (usually setting up a foreign key in your chat model)