Преглед на файлове

changed web.php and VerifyCsrfToken.php

Maksimus111 преди 5 години
родител
ревизия
ca3f2ae5af
променени са 2 файла, в които са добавени 11 реда и са изтрити 1 реда
  1. 8 1
      app/Http/Middleware/VerifyCsrfToken.php
  2. 3 0
      routes/web.php

+ 8 - 1
app/Http/Middleware/VerifyCsrfToken.php

@@ -19,6 +19,13 @@ class VerifyCsrfToken extends Middleware
      * @var array
      */
     protected $except = [
-        //
+       // '869244226:'
     ];
+
+     public function __construct(\Illuminate\Foundation\Application $app, \Illuminate\Contracts\Encryption\Encrypter $encrypter)
+    {
+        $this->app = $app;
+        $this->encrypter = $encrypter;
+        $this->except[] = \Telegram::getAccessToken();
+    }
 }

+ 3 - 0
routes/web.php

@@ -27,3 +27,6 @@ Route::post('/tbot/'.Telegram::getAccessToken(), function(){
     Telegram::commandsHandler(true);
 });
 
+Route::post(Telegram::getAccessToken(), function () {
+	Telegram::commandsHandler(true);
+});