PHP code example of xgrz / laragus

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

    

xgrz / laragus example snippets




    $vatId = 'VAT_ID_NUMBER';

    Xgrz\LaravelGusDataFetcher\Services\GusService::nip($vatId)->toCollection();
    // or
    Xgrz\LaravelGusDataFetcher\Services\GusService::nip($vatId)->toArray();

array [
    0 => array [
        "company_name" => "ACME Limited"
        "city" => "Warsaw"
        "post_code" => "02-226"
        "street" => "ul. Kamyczkowa"
        "property_number" => "201"
        "apartment_number" => "21"
        "vat_id" => "9678907766"
    ]
]


 php artisan vendor:publish vendor:publish --tag="laragus-config"
 
'expose_api_route' => false     // default true