AdminLogMiddleware.php 434 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace App\Http\Middleware;
  3. use App\Servers\AdminLogsServer;
  4. use Closure;
  5. class AdminLogMiddleware
  6. {
  7. /**
  8. * Handle an incoming request.
  9. *
  10. * @param \Illuminate\Http\Request $request
  11. * @param \Closure $next
  12. * @return mixed
  13. */
  14. public function handle($request, Closure $next)
  15. {
  16. //记录访问日志
  17. AdminLogsServer::write();
  18. return $next($request);
  19. }
  20. }