diff --git a/app/Http/Controllers/BotManController.php b/app/Http/Controllers/BotManController.php index cb1ab65..a2a37b7 100644 --- a/app/Http/Controllers/BotManController.php +++ b/app/Http/Controllers/BotManController.php @@ -2,6 +2,7 @@ namespace App\Http\Controllers; +use App\Conversations\ExampleConversation; use Illuminate\Http\Request; use Mpociot\BotMan\BotMan; @@ -20,11 +21,15 @@ public function handle() $bot->reply('Hi there :)'); }); - // Start a conversation - $botman->hears('Start conversation', function (BotMan $bot) { - $bot->startConversation(new ExampleConversation()); - }); - $botman->listen(); } + + /** + * Loaded through routes/botman.php + * @param BotMan $bot + */ + public function startConversation(BotMan $bot) + { + $bot->startConversation(new ExampleConversation()); + } } diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php index e0e8d93..6c91dc6 100644 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -12,6 +12,7 @@ class VerifyCsrfToken extends BaseVerifier * @var array */ protected $except = [ + 'botman', 'botman/*' ]; } diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 87ffb05..056bad7 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -39,7 +39,7 @@ public function map() $this->mapWebRoutes(); - // + require base_path('routes/botman.php'); } /** diff --git a/composer.lock b/composer.lock index 0ff2c13..274acd6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,6 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "f51ac1fa58e97aecb724bdfa0afddbe1", "content-hash": "817bc7a327e61b09f72e712e078985d2", "packages": [ { @@ -59,7 +58,7 @@ "class", "preload" ], - "time": "2016-09-16 12:50:15" + "time": "2016-09-16T12:50:15+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -92,7 +91,7 @@ "MIT" ], "description": "implementation of xdg base directory specification for php", - "time": "2014-10-24 07:27:01" + "time": "2014-10-24T07:27:01+00:00" }, { "name": "doctrine/inflector", @@ -159,7 +158,7 @@ "singularize", "string" ], - "time": "2015-11-06 14:35:42" + "time": "2015-11-06T14:35:42+00:00" }, { "name": "jakub-onderka/php-console-color", @@ -202,7 +201,7 @@ "homepage": "http://www.acci.cz" } ], - "time": "2014-04-08 15:00:19" + "time": "2014-04-08T15:00:19+00:00" }, { "name": "jakub-onderka/php-console-highlighter", @@ -246,7 +245,7 @@ "homepage": "http://www.acci.cz/" } ], - "time": "2015-04-20 18:58:01" + "time": "2015-04-20T18:58:01+00:00" }, { "name": "jeremeamia/SuperClosure", @@ -304,7 +303,7 @@ "serialize", "tokenizer" ], - "time": "2016-12-07 09:37:55" + "time": "2016-12-07T09:37:55+00:00" }, { "name": "laravel/framework", @@ -432,7 +431,7 @@ "framework", "laravel" ], - "time": "2016-11-30 14:58:38" + "time": "2016-11-30T14:58:38+00:00" }, { "name": "league/flysystem", @@ -515,7 +514,7 @@ "sftp", "storage" ], - "time": "2016-10-19 20:38:46" + "time": "2016-10-19T20:38:46+00:00" }, { "name": "monolog/monolog", @@ -593,20 +592,20 @@ "logging", "psr-3" ], - "time": "2016-11-26 00:15:39" + "time": "2016-11-26T00:15:39+00:00" }, { "name": "mpociot/botman", - "version": "1.0.0", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/mpociot/botman.git", - "reference": "8c575fff1516a85e8609569ca047ec072b3d7871" + "reference": "0f98026ae07014806df694a8ff76604adca8ce87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mpociot/botman/zipball/8c575fff1516a85e8609569ca047ec072b3d7871", - "reference": "8c575fff1516a85e8609569ca047ec072b3d7871", + "url": "https://api.github.com/repos/mpociot/botman/zipball/0f98026ae07014806df694a8ff76604adca8ce87", + "reference": "0f98026ae07014806df694a8ff76604adca8ce87", "shasum": "" }, "require": { @@ -656,7 +655,7 @@ "slack", "telegram" ], - "time": "2016-12-08 21:26:58" + "time": "2016-12-15T14:33:20+00:00" }, { "name": "mtdowling/cron-expression", @@ -700,7 +699,7 @@ "cron", "schedule" ], - "time": "2016-01-26 21:23:30" + "time": "2016-01-26T21:23:30+00:00" }, { "name": "nesbot/carbon", @@ -747,7 +746,7 @@ "datetime", "time" ], - "time": "2015-11-04 20:07:17" + "time": "2015-11-04T20:07:17+00:00" }, { "name": "nikic/php-parser", @@ -798,20 +797,20 @@ "parser", "php" ], - "time": "2016-09-16 12:04:44" + "time": "2016-09-16T12:04:44+00:00" }, { "name": "opis/closure", - "version": "2.3.0", + "version": "2.3.2", "source": { "type": "git", "url": "https://github.com/opis/closure.git", - "reference": "477a9335453fde636119eff2d1d56e1173680a9b" + "reference": "bd9055ac7c4f6cdaecddb187d32b814f6d1a3c84" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/477a9335453fde636119eff2d1d56e1173680a9b", - "reference": "477a9335453fde636119eff2d1d56e1173680a9b", + "url": "https://api.github.com/repos/opis/closure/zipball/bd9055ac7c4f6cdaecddb187d32b814f6d1a3c84", + "reference": "bd9055ac7c4f6cdaecddb187d32b814f6d1a3c84", "shasum": "" }, "require": { @@ -852,7 +851,7 @@ "serialization", "serialize" ], - "time": "2016-11-17 12:03:10" + "time": "2016-12-15T12:52:41+00:00" }, { "name": "paragonie/random_compat", @@ -900,7 +899,7 @@ "pseudorandom", "random" ], - "time": "2016-11-07 23:38:38" + "time": "2016-11-07T23:38:38+00:00" }, { "name": "psr/log", @@ -947,7 +946,7 @@ "psr", "psr-3" ], - "time": "2016-10-10 12:19:37" + "time": "2016-10-10T12:19:37+00:00" }, { "name": "psy/psysh", @@ -1019,7 +1018,7 @@ "interactive", "shell" ], - "time": "2016-03-09 05:03:14" + "time": "2016-03-09T05:03:14+00:00" }, { "name": "ramsey/uuid", @@ -1101,7 +1100,7 @@ "identifier", "uuid" ], - "time": "2016-11-22 19:21:44" + "time": "2016-11-22T19:21:44+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -1154,20 +1153,20 @@ "mail", "mailer" ], - "time": "2016-11-24 01:01:23" + "time": "2016-11-24T01:01:23+00:00" }, { "name": "symfony/console", - "version": "v3.1.7", + "version": "v3.1.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "5be36e1f3ac7ecbe7e34fb641480ad8497b83aa6" + "reference": "221a60fb2f369a065eea1ed96b61183219fdfa6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/5be36e1f3ac7ecbe7e34fb641480ad8497b83aa6", - "reference": "5be36e1f3ac7ecbe7e34fb641480ad8497b83aa6", + "url": "https://api.github.com/repos/symfony/console/zipball/221a60fb2f369a065eea1ed96b61183219fdfa6e", + "reference": "221a60fb2f369a065eea1ed96b61183219fdfa6e", "shasum": "" }, "require": { @@ -1215,11 +1214,11 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2016-11-16 22:17:09" + "time": "2016-12-08T14:58:14+00:00" }, { "name": "symfony/debug", - "version": "v3.1.7", + "version": "v3.1.8", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", @@ -1272,11 +1271,11 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2016-11-15 12:55:20" + "time": "2016-11-15T12:55:20+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.2.0", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -1332,20 +1331,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2016-10-13 06:29:04" + "time": "2016-10-13T06:29:04+00:00" }, { "name": "symfony/finder", - "version": "v3.1.7", + "version": "v3.1.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "9925935bf7144f9e4d2b976905881b4face036fb" + "reference": "74dcd370c8d057882575e535616fde935e411b19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/9925935bf7144f9e4d2b976905881b4face036fb", - "reference": "9925935bf7144f9e4d2b976905881b4face036fb", + "url": "https://api.github.com/repos/symfony/finder/zipball/74dcd370c8d057882575e535616fde935e411b19", + "reference": "74dcd370c8d057882575e535616fde935e411b19", "shasum": "" }, "require": { @@ -1381,20 +1380,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2016-11-03 08:04:31" + "time": "2016-12-13T09:38:21+00:00" }, { "name": "symfony/http-foundation", - "version": "v3.1.7", + "version": "v3.1.8", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "5a4c8099a1547fe451256e056180ad4624177017" + "reference": "88a1d3cee2dbd06f7103ff63938743b903b65a92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/5a4c8099a1547fe451256e056180ad4624177017", - "reference": "5a4c8099a1547fe451256e056180ad4624177017", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/88a1d3cee2dbd06f7103ff63938743b903b65a92", + "reference": "88a1d3cee2dbd06f7103ff63938743b903b65a92", "shasum": "" }, "require": { @@ -1434,20 +1433,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2016-11-16 22:17:09" + "time": "2016-11-27T04:21:07+00:00" }, { "name": "symfony/http-kernel", - "version": "v3.1.7", + "version": "v3.1.8", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "674ac403c7b3742c2a988a86e3baf9aca2c696a0" + "reference": "d7a4671a6f8e4174127770263dcd95bee5713f76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/674ac403c7b3742c2a988a86e3baf9aca2c696a0", - "reference": "674ac403c7b3742c2a988a86e3baf9aca2c696a0", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/d7a4671a6f8e4174127770263dcd95bee5713f76", + "reference": "d7a4671a6f8e4174127770263dcd95bee5713f76", "shasum": "" }, "require": { @@ -1516,7 +1515,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2016-11-21 02:44:20" + "time": "2016-12-13T12:52:10+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -1575,7 +1574,7 @@ "portable", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2016-11-14T01:06:16+00:00" }, { "name": "symfony/polyfill-php56", @@ -1631,7 +1630,7 @@ "portable", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2016-11-14T01:06:16+00:00" }, { "name": "symfony/polyfill-util", @@ -1683,20 +1682,20 @@ "polyfill", "shim" ], - "time": "2016-11-14 01:06:16" + "time": "2016-11-14T01:06:16+00:00" }, { "name": "symfony/process", - "version": "v3.1.7", + "version": "v3.1.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "66de154ae86b1a07001da9fbffd620206e4faf94" + "reference": "d23427a7f97a373129f61bc3b876fe4c66e2b3c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/66de154ae86b1a07001da9fbffd620206e4faf94", - "reference": "66de154ae86b1a07001da9fbffd620206e4faf94", + "url": "https://api.github.com/repos/symfony/process/zipball/d23427a7f97a373129f61bc3b876fe4c66e2b3c7", + "reference": "d23427a7f97a373129f61bc3b876fe4c66e2b3c7", "shasum": "" }, "require": { @@ -1732,20 +1731,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2016-09-29 14:13:09" + "time": "2016-11-24T01:08:05+00:00" }, { "name": "symfony/routing", - "version": "v3.1.7", + "version": "v3.1.8", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "8edf62498a1a4c57ba317664a4b698339c10cdf6" + "reference": "4beb3dceb14cf2dd63dd222d1825ca981a2952cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/8edf62498a1a4c57ba317664a4b698339c10cdf6", - "reference": "8edf62498a1a4c57ba317664a4b698339c10cdf6", + "url": "https://api.github.com/repos/symfony/routing/zipball/4beb3dceb14cf2dd63dd222d1825ca981a2952cb", + "reference": "4beb3dceb14cf2dd63dd222d1825ca981a2952cb", "shasum": "" }, "require": { @@ -1807,11 +1806,11 @@ "uri", "url" ], - "time": "2016-08-16 14:58:24" + "time": "2016-11-25T12:27:14+00:00" }, { "name": "symfony/translation", - "version": "v3.1.7", + "version": "v3.1.8", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", @@ -1871,20 +1870,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2016-11-18 21:15:08" + "time": "2016-11-18T21:15:08+00:00" }, { "name": "symfony/var-dumper", - "version": "v3.1.7", + "version": "v3.1.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "0c2d613e890e33f4da810159ac97931068f5bd17" + "reference": "5ccbd23a97035886e595ce497dbe94bc88ac0b57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/0c2d613e890e33f4da810159ac97931068f5bd17", - "reference": "0c2d613e890e33f4da810159ac97931068f5bd17", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/5ccbd23a97035886e595ce497dbe94bc88ac0b57", + "reference": "5ccbd23a97035886e595ce497dbe94bc88ac0b57", "shasum": "" }, "require": { @@ -1934,7 +1933,7 @@ "debug", "dump" ], - "time": "2016-11-03 08:04:31" + "time": "2016-12-08T14:58:14+00:00" }, { "name": "vlucas/phpdotenv", @@ -1984,7 +1983,7 @@ "env", "environment" ], - "time": "2016-09-01 10:05:43" + "time": "2016-09-01T10:05:43+00:00" } ], "packages-dev": [ @@ -2040,7 +2039,7 @@ "constructor", "instantiate" ], - "time": "2015-06-14 21:17:01" + "time": "2015-06-14T21:17:01+00:00" }, { "name": "fzaninotto/faker", @@ -2088,7 +2087,7 @@ "faker", "fixtures" ], - "time": "2016-04-29 12:21:54" + "time": "2016-04-29T12:21:54+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -2133,7 +2132,7 @@ "keywords": [ "test" ], - "time": "2015-05-11 14:41:42" + "time": "2015-05-11T14:41:42+00:00" }, { "name": "mockery/mockery", @@ -2198,7 +2197,7 @@ "test double", "testing" ], - "time": "2016-09-30 12:09:40" + "time": "2016-09-30T12:09:40+00:00" }, { "name": "myclabs/deep-copy", @@ -2240,7 +2239,7 @@ "object", "object graph" ], - "time": "2016-10-31 17:19:45" + "time": "2016-10-31T17:19:45+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -2294,7 +2293,7 @@ "reflection", "static analysis" ], - "time": "2015-12-27 11:43:31" + "time": "2015-12-27T11:43:31+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -2339,7 +2338,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-09-30 07:12:33" + "time": "2016-09-30T07:12:33+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -2386,7 +2385,7 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-11-25 06:54:22" + "time": "2016-11-25T06:54:22+00:00" }, { "name": "phpspec/prophecy", @@ -2449,7 +2448,7 @@ "spy", "stub" ], - "time": "2016-11-21 14:58:47" + "time": "2016-11-21T14:58:47+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2512,7 +2511,7 @@ "testing", "xunit" ], - "time": "2016-11-28 16:00:31" + "time": "2016-11-28T16:00:31+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2559,7 +2558,7 @@ "filesystem", "iterator" ], - "time": "2016-10-03 07:40:28" + "time": "2016-10-03T07:40:28+00:00" }, { "name": "phpunit/php-text-template", @@ -2600,7 +2599,7 @@ "keywords": [ "template" ], - "time": "2015-06-21 13:50:34" + "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", @@ -2644,7 +2643,7 @@ "keywords": [ "timer" ], - "time": "2016-05-12 18:03:57" + "time": "2016-05-12T18:03:57+00:00" }, { "name": "phpunit/php-token-stream", @@ -2693,20 +2692,20 @@ "keywords": [ "tokenizer" ], - "time": "2016-11-15 14:06:22" + "time": "2016-11-15T14:06:22+00:00" }, { "name": "phpunit/phpunit", - "version": "5.7.3", + "version": "5.7.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "de164acc2f2bb0b79beb892a36260264b2a03233" + "reference": "af91da3f2671006ff5d0628023de3b7ac4d1ef09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/de164acc2f2bb0b79beb892a36260264b2a03233", - "reference": "de164acc2f2bb0b79beb892a36260264b2a03233", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/af91da3f2671006ff5d0628023de3b7ac4d1ef09", + "reference": "af91da3f2671006ff5d0628023de3b7ac4d1ef09", "shasum": "" }, "require": { @@ -2727,7 +2726,7 @@ "sebastian/diff": "~1.2", "sebastian/environment": "^1.3.4 || ^2.0", "sebastian/exporter": "~2.0", - "sebastian/global-state": "~1.0", + "sebastian/global-state": "^1.0 || ^2.0", "sebastian/object-enumerator": "~2.0", "sebastian/resource-operations": "~1.0", "sebastian/version": "~1.0|~2.0", @@ -2775,7 +2774,7 @@ "testing", "xunit" ], - "time": "2016-12-09 02:48:53" + "time": "2016-12-13T16:19:44+00:00" }, { "name": "phpunit/phpunit-mock-objects", @@ -2834,7 +2833,7 @@ "mock", "xunit" ], - "time": "2016-12-08 20:27:08" + "time": "2016-12-08T20:27:08+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -2879,7 +2878,7 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2016-02-13 06:45:14" + "time": "2016-02-13T06:45:14+00:00" }, { "name": "sebastian/comparator", @@ -2943,7 +2942,7 @@ "compare", "equality" ], - "time": "2016-11-19 09:18:40" + "time": "2016-11-19T09:18:40+00:00" }, { "name": "sebastian/diff", @@ -2995,7 +2994,7 @@ "keywords": [ "diff" ], - "time": "2015-12-08 07:14:41" + "time": "2015-12-08T07:14:41+00:00" }, { "name": "sebastian/environment", @@ -3045,7 +3044,7 @@ "environment", "hhvm" ], - "time": "2016-11-26 07:53:53" + "time": "2016-11-26T07:53:53+00:00" }, { "name": "sebastian/exporter", @@ -3112,7 +3111,7 @@ "export", "exporter" ], - "time": "2016-11-19 08:54:04" + "time": "2016-11-19T08:54:04+00:00" }, { "name": "sebastian/global-state", @@ -3163,7 +3162,7 @@ "keywords": [ "global state" ], - "time": "2015-10-12 03:26:01" + "time": "2015-10-12T03:26:01+00:00" }, { "name": "sebastian/object-enumerator", @@ -3209,7 +3208,7 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2016-11-19 07:35:10" + "time": "2016-11-19T07:35:10+00:00" }, { "name": "sebastian/recursion-context", @@ -3262,7 +3261,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-11-19 07:33:16" + "time": "2016-11-19T07:33:16+00:00" }, { "name": "sebastian/resource-operations", @@ -3304,7 +3303,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28 20:34:47" + "time": "2015-07-28T20:34:47+00:00" }, { "name": "sebastian/version", @@ -3347,11 +3346,11 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03 07:35:21" + "time": "2016-10-03T07:35:21+00:00" }, { "name": "symfony/css-selector", - "version": "v3.1.7", + "version": "v3.1.8", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -3400,20 +3399,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2016-11-03 08:04:31" + "time": "2016-11-03T08:04:31+00:00" }, { "name": "symfony/dom-crawler", - "version": "v3.1.7", + "version": "v3.1.8", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "1eb3b4d216e8db117218dd2bb7d23dfe67bdf518" + "reference": "51e979357eba65b1e6aac7cba75cf5aa6379b8f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/1eb3b4d216e8db117218dd2bb7d23dfe67bdf518", - "reference": "1eb3b4d216e8db117218dd2bb7d23dfe67bdf518", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/51e979357eba65b1e6aac7cba75cf5aa6379b8f3", + "reference": "51e979357eba65b1e6aac7cba75cf5aa6379b8f3", "shasum": "" }, "require": { @@ -3456,20 +3455,20 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2016-11-14 16:20:02" + "time": "2016-12-10T14:24:45+00:00" }, { "name": "symfony/yaml", - "version": "v3.2.0", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "f2300ba8fbb002c028710b92e1906e7457410693" + "reference": "a7095af4b97a0955f85c8989106c249fa649011f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/f2300ba8fbb002c028710b92e1906e7457410693", - "reference": "f2300ba8fbb002c028710b92e1906e7457410693", + "url": "https://api.github.com/repos/symfony/yaml/zipball/a7095af4b97a0955f85c8989106c249fa649011f", + "reference": "a7095af4b97a0955f85c8989106c249fa649011f", "shasum": "" }, "require": { @@ -3511,7 +3510,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-11-18 21:17:59" + "time": "2016-12-10T10:07:06+00:00" }, { "name": "webmozart/assert", @@ -3561,7 +3560,7 @@ "check", "validate" ], - "time": "2016-11-23 20:04:58" + "time": "2016-11-23T20:04:58+00:00" } ], "aliases": [], diff --git a/config/app.php b/config/app.php index c19400a..3871131 100644 --- a/config/app.php +++ b/config/app.php @@ -166,7 +166,6 @@ /* * Package Service Providers... */ - \Mpociot\BotMan\BotManServiceProvider::class, /* @@ -226,6 +225,8 @@ 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, + 'BotMan' => Mpociot\BotMan\Facades\BotMan::class, + ], ]; diff --git a/readme.md b/readme.md index 6b9e2f7..d48a5eb 100644 --- a/readme.md +++ b/readme.md @@ -15,7 +15,7 @@ the messaging services for testing. The predefined route is `/botman`. 3. Edit your `.env` file and [connect BotMan with your Messaging Services](https://github.com/mpociot/botman#connect-with-your-messaging-service) -4. Modify your bot logic in `app/Controllers/BotManController.php` +4. Modify your bot logic in `app/Controllers/BotManController.php` and/or `routes/botman.php`. 5. Build awesome bots! diff --git a/routes/botman.php b/routes/botman.php new file mode 100644 index 0000000..f2ba5bf --- /dev/null +++ b/routes/botman.php @@ -0,0 +1,5 @@ +