public function getSelectedContextAttribute()
    {
        if (isset($this->context)) {
            return $this->context;
        }
        switch ($this->selected_context_type) {
            case 'Member':
                return $this->context = new MemberContext($this);
            default:
                abort(401, 'Context not selected.');
        }
    }
public function getSelectedContextAttribute()
    {
        if (isset($this->context)) {
            return $this->context;
        }
        switch ($this->selected_context_type) {
            case 'Member':
                return $this->context = new MemberContext($this);
            default:
                abort(401, 'Context not selected.');
        }
    }
public function getSelectedContextAttribute ( ) { if ( isset ( $ this -> context ) ) { return $ this -> context ; } switch ( $ this -> selected_context_type ) { case 'Member' : return $ this -> context = new MemberContext ( $ this ) ; default : abort ( 401 , 'Context not selected.' ) ; } }
Get the selected context

@return MemberContext
@throws HttpResponseException
Get the selected context