PHP code example of alxdorosenco / vatlayer-for-laravel

1. Go to this page and download the library: Download alxdorosenco/vatlayer-for-laravel 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/ */

    

alxdorosenco / vatlayer-for-laravel example snippets


Vatlayer::validate()->setVatNumber('LU26375245')->toArray();
Vatlayer::validate()->setVatNumber('LU26375245')->setFormat(1)->toJson();

Vatlayer::validate()
                ->setVatNumber('LU26375245')
                ->setCallback('CALLBACK_FUNCTION')
                ->setFormat(1)
                ->toJson();

Vatlayer::rate()->setCountryCode('GB')->toArray();
Vatlayer::rate()->setCountryCode('GB')->setFormat(1)->toJson();

Vatlayer::rate()->setIpAddress('176.249.153.36')->toArray();
Vatlayer::rate()->setIpAddress('176.249.153.36')->setFormat(1)->toJson();

Vatlayer::rate()->setCountryCode('GB')->setClientIp(1)->toArray();
Vatlayer::rate()->setCountryCode('GB')->setClientIp(1)->toJson();

Vatlayer::rateList()->toArray();
Vatlayer::rateList()->setFormat(1)->toJson();

Vatlayer::price()->setAmount(100)
                ->setCountryCode('GB')
                ->setType('medical')
                ->setIncl(1)
                ->toArray();
                
Vatlayer::price()->setAmount(100)
                ->setCountryCode('GB')
                ->setType('medical')
                ->setIncl(1)
                ->setFormat(1)
                ->toJson();

Vatlayer::types()->toArray();
Vatlayer::types()->setFormat(1)->toJson();

   php artisan vendor:publish --provider="AlxDorosenco\VatlayerForLaravel\VatlayerServiceProvider" --tag="config"