From 73d32dc6048751adea5d843291d19e6b74bc38c8 Mon Sep 17 00:00:00 2001 From: Steve McDougall Date: Mon, 21 Sep 2020 14:45:48 +0100 Subject: [PATCH] Update changelog and readme --- CHANGELOG.md | 8 ++++++-- README.md | 22 +++++++++++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca6b68c..97f2ea6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,11 @@ All notable changes to `companies-house-laravel` will be documented in this file -## 1.1.0 - 2022-09-17 +## 1.2.0 - 2020-09-21 + +Adding fetching of Company Officers through the API by company number. This will return an OfficerCollection. + +## 1.1.0 - 2020-09-17 Adding company search and more. @@ -10,7 +14,7 @@ Adding company search and more. - Added a new Company Collection, which when coming back from a search will be populated with SearchResult classes. - Added the ability to fake the Http Client on the Client itself - for testing utilities. -## 1.0.0 - 2022-09-16 +## 1.0.0 - 2020-09-16 The initial release allows users to: diff --git a/README.md b/README.md index 8b9c549..ae454f8 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,9 @@ A Laravel wrapper to get companies house information and validate company numbers. This is a work in progress and more methods will be added to the API as they are required. Currently only Company Number is able to be passed to the API. + +This has been tested thoroughly in Laravel 8, Laravel 7 is supported but if you find issues please do drop a detailed issue. + ## Installation You can install the package via composer: @@ -40,7 +43,7 @@ return [ Using it inline: -``` php +```php use JustSteveKing\CompaniesHouseLaravel\Client; // Make a new client @@ -78,6 +81,23 @@ $results->each(function ($result) { }); ``` +Fetching a Collection of Company Officers will return an OfficerCollection: + +```php +use JustSteveKing\CompaniesHouseLaravel\Client; + +$api = Client::make(); + +// Get a collection of Company\SearchResult inside of a CompanyCollection +$results = $api->getOfficers('company-number'); + +// You now have access to all standard Laravel collection methods +$results->each(function ($result) { + // Do something with the result here. +}); +``` + + ## Testing ### Using this library in your own tests