1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace App\Http\Middleware;
- use Illuminate\Http\Response;
- use Illuminate\Http\Request;
- use Closure;
- use App\Log;
- use App\Http\Controllers\Controller;
- use Illuminate\Support\Facades\Auth;
- class VerifyH5SignMiddleware
- {
- public function handle(Request $request, Closure $next)
- {
- $params = $request->all();
- if(!h5_verify_sign($params)){
- $data = Controller::returnValue(['msg' => '验签失败'], 4710);
- Log::logError('验签失败', [
- 'params' => $params
- ], 'h5_verify_sign');
- return new Response($data);
- }
- return $next($request);
- }
- }
|