Skip to content

Commit 96ff30c

Browse files
committed
adding documentation for Address Validation
1 parent 0d9b3ea commit 96ff30c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ There are three important configurations.
2424
- This setting is set to `true` by default for security reasons. You can override this behavior by setting the `verrifyssl` config setting to `false`. Do this at your own risk.
2525

2626
3. Which environment you are working in:
27-
- The options are 'local' and 'production' which tell the package which API url to use, testing or production respectively. If no configuration is found for `env`, it will default to the environment recognized by laravel. This setting takes precedence over `APP_ENV` from `.env` file.
27+
- The options are `'local' and 'production'` which tell the package which API url to use, testing or production respectively. If no configuration is found for `env`, it will default to the environment recognized by laravel. This setting takes precedence over `APP_ENV` from your `.env` file.
2828

2929
We recommend placing all configuration settings in your `.env` file and use Laravel's `env()` helper function to access these values.
3030

@@ -41,13 +41,13 @@ In `config/services.php` add these three settings.
4141

4242
## Usage
4343

44-
The current features offered by this package are listed below.
45-
- [Address Validation](#Address)
44+
The current features offered by this package are:
45+
- [Address Validation](#Address-Validation)
4646

4747

4848
## Address Validation
4949

50-
This `Address` class handles creating and formatting address data. Pass the constructor an associative array of address details. Array keys are case-sensitive.
50+
The `Address` class handles creating and formatting address data. Pass the constructor an associative array of address details. Array keys are case-sensitive.
5151
Below is an example of creating an address and making an api request for validation.
5252

5353
```php
@@ -67,21 +67,21 @@ The USPS api limits 5 address validations per request. If you need to validate m
6767
```php
6868
use ctwillie\Usps\Address;
6969

70-
$address1 = new Address([
70+
$address1 = [
7171
'Address2' => '6406 Ivy Lane',
7272
'City' => 'Greenbelt',
7373
'State' => 'MD',
7474
'Zip5' => 20770
75-
]);
75+
];
7676

77-
$address2 = new Address([
77+
$address2 = [
7878
'Address2' => '6406 Ivy Lane',
7979
'City' => 'Greenbelt',
8080
'State' => 'MD',
8181
'Zip5' => 20770
82-
]);
82+
];
8383

84-
$addresses = [$address1, $address2];
84+
$addresses = new Address([$address1, $address2])
8585

8686
$response = $addresses->validate();
8787
```

0 commit comments

Comments
 (0)