location /websockets/ {
proxy_pass http://127.0.0.1:6001/;
proxy_set_header Host $host;
proxy_read_timeout 60;
proxy_connect_timeout 60;
proxy_redirect off;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use React\EventLoop\Factory; | |
use BotMan\BotMan\BotManFactory; | |
use BotMan\BotMan\Cache\ArrayCache; | |
use BotMan\BotMan\Drivers\DriverManager; | |
use BotMan\Drivers\Slack\SlackRTMDriver; | |
$loop = Factory::create(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\BotMan\Middleware; | |
use BotMan\BotMan\BotMan; | |
use Laravel\Passport\TokenRepository; | |
use League\OAuth2\Server\ResourceServer; | |
use Symfony\Component\HttpFoundation\Request; | |
use BotMan\Drivers\AmazonAlexa\Extensions\Card; | |
use BotMan\BotMan\Interfaces\Middleware\Received; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use App\Channel; | |
use App\Http\Controllers\BotManController; | |
use BotMan\BotMan\Drivers\DriverManager; | |
use BotMan\Drivers\Slack\SlackDriver; | |
use BotMan\Drivers\Slack\SlackRTMDriver; | |
use BotMan\Drivers\Telegram\TelegramDriver; | |
use BotMan\Drivers\Web\WebDriver; | |
$botman = resolve('botman'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return [ | |
/* | |
|-------------------------------------------------------------------------- | |
| Multitenancy Support | |
|-------------------------------------------------------------------------- | |
| | |
| Here you can decide wether your chatbot supports multiple |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use BotMan\Drivers\Slack\SlackDriver; | |
Route::get('/', function () { | |
$task_id = uniqid(); | |
// Send the message to the channel | |
$result = app('botman')->say('example', '#botman-tests', SlackDriver::class, [ | |
'attachments' => json_encode([ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests\BotMan; | |
use Tests\TestCase; | |
class ExampleTest extends TestCase | |
{ | |
/** | |
* A basic test example. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Components\GitHub; | |
use App\Events\GitHub\FileContentFetched; | |
use App\Events\GitHub\TotalsFetched; | |
use GitHub; | |
use Illuminate\Console\Command; | |
class FetchGitHubTotals extends Command |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\BotMan\Middleware; | |
use Mpociot\BotMan\Message; | |
use Mpociot\BotMan\Http\Curl; | |
use Mpociot\BotMan\Interfaces\HttpInterface; | |
use Mpociot\BotMan\Interfaces\DriverInterface; | |
use Mpociot\BotMan\Interfaces\MiddlewareInterface; |