public function execute()
    {
        $result = $this->resultJson->create();
        try {
            $countries = $this->countryHelper->toOptionArray();
            if (!$countries) {
                return $result->setData([
                    'status'    => false,
                    'msg'       => 'Could not fetch list countries.'
                ]);
            }

            return $result->setData([
                'status'    => true,
                'countries'  => $countries
            ]);
        } catch (\Exception $e) {
            return $result->setData([
                'status'    => false,
                'msg'       => $e->getMessage()
            ]);
        }
    }
public function execute()
    {
        $result = $this->resultJson->create();
        try {
            $countries = $this->countryHelper->toOptionArray();
            if (!$countries) {
                return $result->setData([
                    'status'    => false,
                    'msg'       => 'Could not fetch list countries.'
                ]);
            }

            return $result->setData([
                'status'    => true,
                'countries'  => $countries
            ]);
        } catch (\Exception $e) {
            return $result->setData([
                'status'    => false,
                'msg'       => $e->getMessage()
            ]);
        }
    }
public function execute ( ) { $ result = $ this -> resultJson -> create ( ) ; try { $ countries = $ this -> countryHelper -> toOptionArray ( ) ; if ( ! $ countries ) { return $ result -> setData ( [ 'status' => false , 'msg' => 'Could not fetch list countries.' ] ) ; } return $ result -> setData ( [ 'status' => true , 'countries' => $ countries ] ) ; } catch ( \ Exception $ e ) { return $ result -> setData ( [ 'status' => false , 'msg' => $ e -> getMessage ( ) ] ) ; } }
Gte a list of all modules

@return $this|ResponseInterface|ResultInterface
Gte a list of all modules