private function filterMessage($param, $value)
    {
        $messages = session($this->session_key, []);

        $filtered_messages = [];
        foreach ($messages as $message) {
            if ($message[$param] == $value) {
                $filtered_messages[] = $message;
            }
        }

        return $filtered_messages;
    }
private function filterMessage($param, $value)
    {
        $messages = session($this->session_key, []);

        $filtered_messages = [];
        foreach ($messages as $message) {
            if ($message[$param] == $value) {
                $filtered_messages[] = $message;
            }
        }

        return $filtered_messages;
    }
private function filterMessage ( $ param , $ value ) { $ messages = session ( $ this -> session_key , [ ] ) ; $ filtered_messages = [ ] ; foreach ( $ messages as $ message ) { if ( $ message [ $ param ] == $ value ) { $ filtered_messages [ ] = $ message ; } } return $ filtered_messages ; }
Filter messages by param.

@param string $param
@param string $value

@return array
Filter messages by param .