use Illuminate\Routing\Router;
protected $route;
function __construct(Router $route)
{
$this->route = $route;
}
public function handle($request, Closure $next)
{
$response = $next($request);
$requestData = [
'client_ip' => $request->getClientIp() ?? null,
'path' => $request->path() ?? null,
'ua' => $request->header('user-agent') ?? null,
'params' => json_encode($request->all(),JSON_UNESCAPED_UNICODE),
];
$thiis->route->current()->getName();//$this->route->current()->uri();
$this->route->currentRouteAction()
return $response;
}