public function getData($key, $default = false)
    {
        if ($this->sessionBag->has($key)){
            return $this->sessionBag->get($key);
        } else {
            return $default;
        }
    }
public function getData($key, $default = false)
    {
        if ($this->sessionBag->has($key)){
            return $this->sessionBag->get($key);
        } else {
            return $default;
        }
    }
public function getData ( $ key , $ default = false ) { if ( $ this -> sessionBag -> has ( $ key ) ) { return $ this -> sessionBag -> get ( $ key ) ; } else { return $ default ; } }
Returns session data

@param string $key
@param mixed $default Default value to be returned in case requested key doesn't exist
@return mixed
Returns session data