PHP code example of canducci / zipcodepostmon

1. Go to this page and download the library: Download canducci/zipcodepostmon 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/ */

    

canducci / zipcodepostmon example snippets


"canducci/zipcodepostmon": "1.*" 

'providers' => array(
    ...,
    Canducci\ZipCodePostmon\Providers\ZipCodeProvider::class
),


'aliases' => array(
    ...,
    'ZipCodeRequest' => Canducci\ZipCode\Facades\ZipCodeRequest::class,
),


use Canducci\ZipCodePostmon\Facades\ZipCodeRequest;

$zipCodeResult = ZipCodeRequest::find('01414-001');

$zipCodeResult = zipcode('01414000'); 
//or 
$zipCodeResult = zipcode()->find('01414000');

use Canducci\ZipCodePostmon\ZipCodeRequest;


public function index(ZipCodeRequest $zipCodeRequest)
{
      $zipCodeResult = $zipCodeRequest->find('01414000');
}      

$zipCodeResult = ZipCodeRequest::find('01414000'); //Facade
$zipCodeResult = $zipCodeRequest->find('01414000'); //Contracts
$zipCodeResult = zipcode('01414000'); // Helper
$zipCodeResult = zipcode()->find('01414000'); // Helper