musoftware / botman-vk-driver
Vk driver for BotMan
0.0.4
2019-01-22 15:42 UTC
Requires
- php: >=7.0
- ext-json: *
- botman/botman: ^2.4
- guzzlehttp/guzzle: ^6.3
- illuminate/support: ^5.7
- symfony/cache: ~3.4|~4.0
This package is auto-updated.
Last update: 2024-10-12 22:50:37 UTC
README
Driver for Botman library
Example Conversation Class
<?php namespace App\Conversation; use VkBotMan\Model\AbstractConversation; /** * Class EntryPointConversation */ class EntryPointConversation extends AbstractConversation { //... logic your conversation }
Example Using Conversation (Symfony framework)
<?php namespace App\Controller; use App\Conversation\EntryPointConversation; //... class VkController extends AbstractController { /** * @Route("/app/callback", methods={"POST"}, name="app_callback") * @param Request $request * @return Response */ public function callback( Request $request ) { $vkApiHandler = new VkApiHandler(); $handler = new BotManHandler( $request, $vkApiHandler ); $handler->attachConversation(new EntryPointConversation()); return new Response(); } }