Skip to content

Commit

Permalink
Config update.
Browse files Browse the repository at this point in the history
  • Loading branch information
tanelt committed May 14, 2019
1 parent f5fb75c commit fdde8ab
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config/pdfgeneratorapi.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
return [
'key' => env('PDF_GENERATOR_KEY'),
'secret' => env('PDF_GENERATOR_SECRET'),
'base_url' => env('PDF_GENERATOR_BASE_URL', 'https://pdfgeneratorapi.com/api/v3/'),
'base_url' => env('PDF_GENERATOR_BASE_URL', 'https://us1.pdfgeneratorapi.com/api/v3/'),
'default_workspace' => env('PDF_GENERATOR_DEFAULT_WORKSPACE'),
/**
* If set to true then a json file is generated and url is sent to service instead of posting the data
Expand Down
6 changes: 4 additions & 2 deletions demo/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=

PDF_GENERATOR_TOKEN=
PDF_GENERATOR_DEFAULT_WORKSPACE=
PDF_GENERATOR_KEY=
PDF_GENERATOR_SECRET=
PDF_GENERATOR_USE_DATA_URL=true
PDF_GENERATOR_BASE_URL=https://us1.pdfgeneratorapi.com/api/v3/
PDF_GENERATOR_USE_DATA_URL=false
4 changes: 1 addition & 3 deletions demo/app/Repositories/DataRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ class DataRepository extends \ActualReports\PDFGeneratorAPILaravel\Repositories\

public function getRawData()
{
$data = \GuzzleHttp\json_decode(parent::getRawData());
$data[0]->DocNumber = 'IE123121';
return $data;
return parent::getRawData();
}
}
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Add configuration to your .env file
```dotenv
PDF_GENERATOR_KEY={YOUR_API_KEY}
PDF_GENERATOR_SECRET={YOUR_API_SECRET}
PDF_GENERATOR_BASE_URL=https://us1.pdfgeneratorapi.com/api/v3/
PDF_GENERATOR_USE_DATA_URL=true
```
If "PDF_GENERATOR_USE_DATA_URL" is set to true then we send an url to your data file instead of sending the data in request body.
Expand Down

0 comments on commit fdde8ab

Please sign in to comment.