botman / botman

A framework agnostic PHP library to build chat bots
https://botman.io
MIT License
6.06k stars 812 forks source link

new concept, but i dont know where to start #903

Closed ulmaull closed 5 years ago

ulmaull commented 6 years ago

Description:

i want after login in simple auth laravel, my botman can send message " you login into my laravel web ", ### Steps To Reproduce: first i make new laravel project, after that i make simple login and register with " php artisan make:auth ", and then i build botman project into new my laravel project, so, i have two tabs, one tab for show login, register and many other things, and then another tabs show botman message like " you are login into my laravel web ".

christophrumpel commented 5 years ago

I'm not completely sure what you want to do.

Basically, you can check if a user is logged in inside BotMan Studio everywhere.

if (Auth::check()) {
    // The user is logged in...
}

You could use this inside a middleware or inside a conversation or hears method and depending on if the user is logged in do something. You could also after the user logged into your application originate a message to the user on Telegram, if this is what you want. https://botman.io/2.0/sending#originating-messages.

Please come to the Slack channel for such ideas. This is here is more for issues.