PHP code example of imo-tikuwa / cakephp-zipcode-jp

1. Go to this page and download the library: Download imo-tikuwa/cakephp-zipcode-jp library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

imo-tikuwa / cakephp-zipcode-jp example snippets


class Application extends BaseApplication
{
    public function bootstrap()
    {
        $this->addPlugin('ZipcodeJp', ['routes' => true]);
    }
}

$zipcode = '1010032';

$this->ZipcodeJps = $this->fetchTable('ZipcodeJp.ZipcodeJps');
$result = $this->ZipcodeJps->findByZipcode($zipcode);