@ -8,7 +8,17 @@ use Illuminate\Http\Request;
class WechatAuthController extends Controller
{
//
public function checkSign(Request $request)
public function auth(Request $request)
if ($this->checkSign($request)) {
return $request->echostr;
}
return false;
private function checkSign($request)
$signature = $request->signature;
$timestamp = $request->timestamp;
@ -24,7 +24,7 @@ Route::namespace('Api')->prefix('v1')->group(function () {
Route::any('/test', [TestController::class, 'index'])->name('test.index');
Route::prefix('wechat')->group(function () {
Route::get('/auth', [WechatAuthController::class, 'checkSign'])->name('wechat.auth.checkSign');
Route::get('/auth', [WechatAuthController::class, 'auth'])->name('wechat.auth.auth');
});