mirror of
https://github.com/v2board/v2board.git
synced 2025-01-11 08:39:09 +08:00
22 lines
467 B
PHP
22 lines
467 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Guest;
|
|
|
|
use Illuminate\Http\Request;
|
|
use App\Http\Controllers\Controller;
|
|
|
|
class TelegramController extends Controller
|
|
{
|
|
public function __construct(Request $request)
|
|
{
|
|
if ($request->input('access_token') !== md5(config('v2board.telegram_bot_token'))) {
|
|
abort(500, 'authentication failed');
|
|
}
|
|
}
|
|
|
|
public function webhook(Request $request)
|
|
{
|
|
info($request->input());
|
|
}
|
|
}
|