Skip to content

Commit

Permalink
update api endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
kolirt committed Oct 19, 2023
1 parent 866e716 commit bb33fb9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"laravel-ukrposhta"
],
"license": "MIT",
"version": "1.0.2",
"version": "1.0.3",
"authors": [
{
"name": "kolirt"
Expand Down
1 change: 1 addition & 0 deletions config/ukrposhta.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

return [
'api' => 'https://www.ukrposhta.ua/',
'timeout' => env('UKRPOSHTA_TIMEOUT', 3)
];
4 changes: 3 additions & 1 deletion src/Ukrposhta.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Ukrposhta
{

private $client;
private $api = 'https://ukrposhta.ua/';
private $api;

const COUNTRY_CODES = [
'uk' => 'UA',
Expand All @@ -23,6 +23,8 @@ class Ukrposhta

public function __construct()
{
$this->api = config('ukrposhta.api');

$this->client = new Client([
'base_uri' => $this->api,
'timeout' => config('ukrposhta.timeout', 3),
Expand Down

1 comment on commit bb33fb9

@kolirt
Copy link
Owner Author

@kolirt kolirt commented on bb33fb9 Oct 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1

Please sign in to comment.