PHP code example of cboxdk / laravel-geo
1. Go to this page and download the library: Download cboxdk/laravel-geo 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/ */
cboxdk / laravel-geo example snippets
use Cbox\Geo\Contracts\JurisdictionRepository;
use Cbox\Geo\ValueObjects\CountryCode;
use Cbox\Geo\ValueObjects\SubdivisionCode;
$geo = app(JurisdictionRepository::class);
$dk = $geo->find(new CountryCode('DK'));
$dk->currency; // "DKK"
$dk->taxProfile->regimeModule; // "eu-vat"
$dk->taxProfile->isEuMember; // true
$dk->isResolvedForTax(); // true — national regime
$us = $geo->find(new CountryCode('US'));
$us->needsSubdivision(); // true — sub-federal, a state is