createGuestToken($request); $request->merge(['clientToken' => $token]); return $next($request); } public function createGuestToken(Request $request) { return sha1($request->ip() . $request->header('User-Agent')); } }