PHP code example of datomatic / laravel-fatture-in-cloud

1. Go to this page and download the library: Download datomatic/laravel-fatture-in-cloud 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/ */

    

datomatic / laravel-fatture-in-cloud example snippets


return [
    'access_token'  => env('FATTURE_IN_CLOUD_ACCESS_TOKEN'),
    'company_id'  => env('FATTURE_IN_CLOUD_COMPANY_ID'),
    'endpoint' => env('FATTURE_IN_CLOUD_ENDPOINT','https://api-v2.fattureincloud.it/'),
];

use Datomatic\FattureInCloud\Facades\FattureInCloud;
//Facade
FattureInCloud::invoices()->...

use Datomatic\FattureInCloud\FattureInCloud;

//Automatic Injection
public function __construct(FattureInCloud $fic){}

//Resolve
$fic = App::make(FattureInCloud::class);
$fic = app(Datomatic\FattureInCloud\FattureInCloud::class);

$fic->clients()->all(['fieldset' => 'detailed'])
bash
php artisan vendor:publish --provider="Datomatic\FattureInCloud\FattureInCloudServiceProvider" --tag="fatture-in-cloud-config"