Prechádzať zdrojové kódy

changed web.php and VerifyCsrfToken.php

Maksimus111 5 rokov pred
rodič
commit
ca3f2ae5af
2 zmenil súbory, kde vykonal 11 pridanie a 1 odobranie
  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
      * @var array
      */
      */
     protected $except = [
     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);
     Telegram::commandsHandler(true);
 });
 });
 
 
+Route::post(Telegram::getAccessToken(), function () {
+	Telegram::commandsHandler(true);
+});