public function makeStatePostalCode($item)
    {
        $item = coollect($item);

        if ($item->iso_3166_2 !== '') {
            $code = explode('-', $item->iso_3166_2);

            if (count($code) > 1) {
                return $code[1];
            }
        }

        if (! empty(trim($item->postal))) {
            $item->postal;
        }

        if ($item->code_hasc !== '') {
            $code = explode('.', $item->code_hasc);

            if (count($code) > 1) {
                return $code[1];
            }
        }

        return $this->helper->caseForKey($item->iso_3166_2);
    }
public function makeStatePostalCode($item)
    {
        $item = coollect($item);

        if ($item->iso_3166_2 !== '') {
            $code = explode('-', $item->iso_3166_2);

            if (count($code) > 1) {
                return $code[1];
            }
        }

        if (! empty(trim($item->postal))) {
            $item->postal;
        }

        if ($item->code_hasc !== '') {
            $code = explode('.', $item->code_hasc);

            if (count($code) > 1) {
                return $code[1];
            }
        }

        return $this->helper->caseForKey($item->iso_3166_2);
    }
public function makeStatePostalCode ( $ item ) { $ item = coollect ( $ item ) ; if ( $ item -> iso_3166_2 !== '' ) { $ code = explode ( '-' , $ item -> iso_3166_2 ) ; if ( count ( $ code ) > 1 ) { return $ code [ 1 ] ; } } if ( ! empty ( trim ( $ item -> postal ) ) ) { $ item -> postal ; } if ( $ item -> code_hasc !== '' ) { $ code = explode ( '.' , $ item -> code_hasc ) ; if ( count ( $ code ) > 1 ) { return $ code [ 1 ] ; } } return $ this -> helper -> caseForKey ( $ item -> iso_3166_2 ) ; }
Get the state postal code.

@param $item
@return mixed
Get the state postal code .