1234567891011121314151617181920212223242526 |
- <?php
- namespace App\Http\Middleware;
- use App\Servers\AdminLogsServer;
- use App\Servers\MemberLogsServer;
- use Closure;
- class MemberLogMiddleware
- {
- /**
- * Handle an incoming request.
- *
- * @param \Illuminate\Http\Request $request
- * @param \Closure $next
- * @return mixed
- */
- public function handle($request, Closure $next)
- {
- //记录访问日志
- // dd($_SERVER['HTTP_X_FORWARDED_FOR']);
- MemberLogsServer::write();
- return $next($request);
- }
- }
|