protected function getPayload(string $session_id, $data) : array
    {
        return [
            'id'            => $session_id,
            'user_id'       => $this->request->user()->id ?? null,
            'ipv4'          => $this->getLongIp(),
            'user_agent'    => $this->request->server('HTTP_USER_AGENT'),
            'data'          => base64_encode(is_array($data) ? serialize($data) : $data),
        ];
    }
protected function getPayload(string $session_id, $data) : array
    {
        return [
            'id'            => $session_id,
            'user_id'       => $this->request->user()->id ?? null,
            'ipv4'          => $this->getLongIp(),
            'user_agent'    => $this->request->server('HTTP_USER_AGENT'),
            'data'          => base64_encode(is_array($data) ? serialize($data) : $data),
        ];
    }
protected function getPayload ( string $ session_id , $ data ) : array { return [ 'id' => $ session_id , 'user_id' => $ this -> request -> user ( ) -> id ?? null , 'ipv4' => $ this -> getLongIp ( ) , 'user_agent' => $ this -> request -> server ( 'HTTP_USER_AGENT' ) , 'data' => base64_encode ( is_array ( $ data ) ? serialize ( $ data ) : $ data ) , ] ; }
Get session payload

@param string       $session_id
@param string|array $data
@return array
Get session payload