Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve README.md #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ For Laravel 5.5 *Postcodes* will be automatically discovered.
Edit `/config/app.php` and add the service provider to your `providers` array.
```php
'providers' => [
Codescheme\Postcodes\PostcodeServiceProvider::class,
Codescheme\Postcodes\PostcodeServiceProvider::class,
]
```

Also here, add the alias:
```php
'aliases' => [
'Postcode' => Codescheme\Postcodes\Facades\Postcode::class,
'Postcode' => Codescheme\Postcodes\Facades\Postcode::class,
]
```

Expand All @@ -39,26 +39,26 @@ Route::get('/postcode', function(){
$data = Postcode::postcodeLookup('SE21 8JL');
print_r($data);
return null;
});
});
```

## Methods

```
Postcode::validate('SE31 9AX'); //returns boolean
```php
Postcode::validate('SE31 9AX'); // returns boolean
Postcode::postcodeLookup('SE21 8JL');
Postcode::nearest('SE21 8JL');
Postcode::reverseGeocode(-0.397913, 51.44015); // long,lat
Postcode::reverseGeocode(-0.397913, 51.44015); // long, lat
Postcode::autocomplete('RG1 3');
Postcode::outcodeLookup('SE21');

$postcodes = ['OX49 5NU', 'M32 0JG', 'NE30 1DP'];
Postcode::postcodeLookupBulk($postcodes);

$coordinates = [
['longitude' => 0.629834723775309, 'latitude' => 51.7923246977375],
['longitude' => -2.49690382054704, 'latitude' => 53.5351312861402]
];
['longitude' => -2.49690382054704, 'latitude' => 53.5351312861402]
];
Postcode::reverseGeocodeBulk($coordinates);
```

Expand All @@ -67,4 +67,3 @@ Postcode::reverseGeocodeBulk($coordinates);
``` bash
$ composer test
```